linux清理磁盘 大文件_为什么磁盘清理不删除Temp文件夹中的所有内容?

linux清理磁盘 大文件

linux清理磁盘 大文件

sshot-2010-12-02-1-01-25-06

After you’ve used Disk Cleanup, you probably expect every temporary file to be completely deleted, but that’s not actually the case. Files are only deleted if they are older than 7 days old, but you can tweak that number to something else.

使用磁盘清理之后,您可能希望每个临时文件都被完全删除,但实际上并非如此。 仅在文件存在7天以上时才将其删除,但是您可以将该数字调整为其他值。

This is one of those tutorials that we’re showing you for the purpose of explaining how something works, but we’re not necessarily recommending that you implement it unless you really understand what’s going on. Keep reading for more.

这是我们向您显示的其中一本教程,目的是解释某些事物的工作原理,但是除非您真正了解发生了什么,否则我们不一定建议您实施它。 继续阅读以获取更多信息。

为什么磁盘清理不删除所有文件? (Why Doesn’t Disk Cleanup Delete All Files?)

The applications that you’re running create temporary files, not to litter your hard drive, but to store files while the application is working on them—whether it’s downloading files, storing files that you’re currently editing, or just caching files so the next time you open the application the files will be more quickly accessible.

您正在运行的应用程序会创建临时文件,而不是在您的硬盘驱动器上乱扔垃圾,而是在应用程序正在处理文件时存储文件-无论是下载文件,存储当前正在编辑的文件还是仅缓存文件,这样下次打开应用程序时,将可以更快速地访问文件。

The problem is that most applications don’t seem to clean up after themselves, or if they do, they definitely don’t do it very well. That’s why your temporary folder gets really huge over time, and needs to be cleaned out.

问题在于,大多数应用程序似乎并不会自行清理,或者如果清除,肯定不会做得很好。 这就是为什么您的临时文件夹随着时间的流逝会变得非常巨大,并且需要清理的原因。

Since these files are often being used by applications, Windows doesn’t know whether a particular file can be deleted, so Disk Cleanup only cleans up files that are older than 7 days, which is a safe guess—most people probably don’t have an application open for more than a week, especially since Microsoft makes you reboot nearly every Tuesday, right?

由于这些文件经常被应用程序使用,因此Windows不知道是否可以删除特定文件,因此“磁盘清理”仅清理7天以上的文件,这是可以肯定的猜测-大多数人可能没有一个应用程序打开了一个多星期,特别是因为Microsoft使您几乎每个星期二都重新启动,对吧?

image

You can even see in the screenshot that Disk Cleanup explains this to you, if you select the Temporary files option in the list.

如果在列表中选择“临时文件”选项,您甚至可以在屏幕快照中看到“磁盘清理”向您说明了这一点。

更改磁盘清理以删除7天以上的文件 (Change Disk Cleanup to Delete Files Newer than 7 Days)

If you’re one of those people that reboots your PC every day, you can probably change the Disk Cleanup value down to something lower, like 2 days. If you don’t reboot but you rarely keep applications open, you could probably do fine with 2-3 days instead, though the value you choose is really up to you—just keep in mind applications need those temporary files if they are running.

如果您是每天重启PC的用户之一,则可以将Disk Cleanup值更改为较低的值,例如2天。 如果您不重新启动但很少打开应用程序,则可以选择2到3天,尽管您选择的值实际上取决于您,但是请记住,如果应用程序正在运行,请记住它们需要这些临时文件。

Open up regedit.exe through the Start Menu search or run box, and then browse down to the following key:

通过“开始菜单”搜索或运行框打开regedit.exe,然后向下浏览至以下键:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\   CurrentVersion\Explorer\VolumeCaches\Temporary Files

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer \ VolumeCaches \ Temporary Files

Once you’re there, you’ll see the LastAccess value on the right-hand side, which contains a value that specifies the number of days, which you can change to whatever you’d like.

到达那里后,您会在右侧看到LastAccess值,其中包含一个指定天数的值,您可以将其更改为所需的天数。

image

If you want to see the results of your changes, you can open up your temporary folder by entering the following into the Windows Explorer location bar:

如果要查看更改的结果,可以通过在Windows资源管理器位置栏中输入以下内容来打开临时文件夹:

%temp%

%temp%

image

And again, if you’re an average user, you probably shouldn’t mess with this registry value—but at least you know a little more how it works, right?

再说一次,如果您是普通用户,则可能不应该将此注册表值弄乱了-但是至少您知道更多它的工作原理,对吗?

翻译自: https://www.howtogeek.com/howto/36924/why-doesnt-disk-cleanup-delete-everything-from-the-temp-folder/

linux清理磁盘 大文件

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值