这一篇是针对于Windows系统,在文件夹和搜索选项中将“隐藏受保护的操作系统文件”这一项关闭后,在C盘根目录下往往会出现pagefile.sys和hiberfil.sys这两个隐藏文件,而且文件大小很大,一般与本机内存同等大小。
如果C盘空间不足时,可以删除这两个文件,这样系统盘就可以多出部分可用空间了。
那么这两个文件是什么呢?这两个文件是受保护的操作系统文件无法直接删除,那么又怎样去清理呢?
首先说pagefile.sys,它是跟虚拟内存功能有关的文件。
虚拟内存作为物理内存的补充,在本机物理内存不足时,可以减轻内存的压力。但由于虚拟内存是位于硬盘上,读写速度上肯定比不上物理内存,因此为提高性能一般把虚拟内存设置在固态盘上,这样就往往会占用大量系统盘空间。
虚拟内存功能不建议直接关闭,而可以将虚拟内存大小改为浮动。
文件大小可以在右键计算机-管理-高级系统设置-高级-性能-高级-更改-自定义大小处进行更改(我懒得放图了)。由固定大小改为浮动大小(例如32000-32000改为4000-16000),更改后记得点一下设置,重启后才能生效。
重启后就能发现 pagefile.sys 文件变小了,C盘也多出这部分可用空间了。
那么如果有100台机器都要改总不能挨个点吧?嗯,确实有更加自动化的方法可以更改虚拟内存设置,那就是通过注册表。
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
这一项的PagingFiles值就是虚拟内存的设置。
格式一般是“虚拟内存文件路径 最小值 最大值”,因此使用cmd命令直接修改此注册表值,然后重启,即可完成批量修改虚拟内存设置。
顺便一提,添加注册表的CMD命令如下,**.reg为修改好的注册表路径。
regedit /S **.reg
下面说一下hiberfil.sys这个系统文件,这个文件跟系统的休眠功能有关。
休眠功能是 Windows 系统自带的一个功能,它可以把当前电脑上所有运行的数据保存到硬盘休眠文件中。当设备断电或是重启时,可以迅速从休眠文件中的内容恢复过来。
关掉的方法很简单,管理员运行CMD命令powercfg -h off 即可关闭休眠功能,不需要重启。
再查看系统盘根目录,hiberfil.sys 文件已经消失了,系统盘也有了更多可用空间。
优于别人,并不高贵,
真正的高贵应该是
优于过去的自己。
《真实的高贵》
——海明威


评论
192581 153581Im sure your publish and internet web site is extremely constructed 707738
142750 361471It was any exhilaration discovering your site yesterday. I arrived here nowadays hunting new points. I was not necessarily frustrated. Your suggestions following new approaches on this thing have been helpful plus an superb assistance to personally. We appreciate you leaving out time to write out these items and then for revealing your thoughts. 354930
Boost your play with the working https://www.mrclarksdesigns.builderspot.com/board/board_topic/690695/7326619.htm. Take advantage of free bets, cashback, and extra spins for a perfect start.
Boost your play with the most trusted https://twanty2.com/read-blog/25553. Take advantage of free bets, cashback, and extra spins for a perfect start.
227821 313605This is wonderful content. Youve loaded this with helpful, informative content that any reader can comprehend. I enjoy reading articles that are so very well-written. 106972
Bet smarter and elevate your game using the powerful https://forum.amzgame.com/thread/detail?id=311279&page=52#reply. Activate your bonus today and explore a world of sports betting and online entertainment.
Maximize your winnings today using the official https://pinxters.com/blogs/81623/1xBet-Bangladesh-Promo-Code-2026-VIP-13-000-Bonus. Turn your first wager into a risk-free opportunity and enjoy fast payouts.
Maximize your winnings today using the newest https://www.greencarpetcleaningprescott.com/board/board_topic/7203902/7326616.htm. Turn your first wager into a risk-free opportunity and enjoy fast payouts.
https://moneylead.gg/