windows回收站究竟是如何工作的?

你在Windows中删除一个文件,它会被扔进回收站,然后你再把它捞出来。在整个过程中到底发生了什么?...

windows回收站究竟是如何工作的?

你在Windows中删除一个文件,它会被扔进回收站,然后你再把它捞出来。在整个过程中到底发生了什么?

今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,是一个由社区驱动的问答网站分组。

问题

超级用户读者Jonath0n对回收站很好奇:

What does the Recycle Bin in Windows actually do? Is it just a glorified folder and a holding place for soon to be deleted files, or does it do something specific? Specifically, are files that are “moved” to the Recycle Bin actually moved on the hard disc, or are just the pointers to the files moved? I am a fairly experienced user, I just wanted a more depth explanation of the Recycle Bin.

那是怎么回事?回收站究竟是如何作为一种文件炼狱的?

答案

超级用户贡献者Tim Wij**an提供了一个幕后的高峰:

The reference is removed, a metadata file is kept in the Recycle Bin to know the original location.

In the early days, on Windows 95 and 98 this was located in \RECYCLED. On Windows 2000 and later it was renamed to \RECYCLER. Since Windows Vista it is now a special folder called \$Recycle.Bin.

Use Process Monitor to see the I/O under the hood, put a filter on Recycle.Bin and visit it. :)

For example, when I do this:

notepad \$RECYCLE.BIN\S-1-5-21-0192837465-987654321-0123456789-1000\$EXAMPL5

Note: The long folder name is a User SID. The last folder name is a hash based on the metadata.

I get a file that contains metadata information like this:

Ö¸ÌC : \ P a t h \ T o \ S o m e \ E x a m p l e . t x t

The reason that the file path has spaces in between is because it is stored in wide byte chars, to support special characters for certain languages as well as unicode and what else. The earlier symbols are binary and contain information like the file size and permissi***, as well as a pointer to the file data. In essence, it contains enough information to rec***truct the original reference…

It’s sad that the Windows Internals book doesn’t cover this, or else I would’ve had more reference. I haven’t found any articles that go into detail on this, neither by Microsoft or by third party people. They probably do exist but I found it easier to go and reverse engineer the main concept…


有什么要补充的解释吗?在评论中发出声音。想从其他精通技术的Stack Exchange用户那里了解更多答案吗?在这里查看完整的讨论主题。

 

  • 发表于 2021-04-11 17:54
  • 阅读 ( 164 )
  • 分类:互联网

你可能感兴趣的文章

如何按计划自动清空回收站并释放浪费的空间

Windows中的回收站是删除文件的炼狱。每当你对一个文件按Delete键,它就会进入回收站等待它的命运。您仍然可以在文件存在时恢复它,因此如果您改变主意,只需单击几下就可以恢复。 ...

  • 发布于 2021-03-14 08:37
  • 阅读 ( 273 )

如何在Windows10上按时间表清空回收站

...能,您可以通过配置Windows 10每天、每周或每月自动删除回收站中某个时间段的文件来节省磁盘空间。下面是如何设置它。 首先,打开“开始菜单”并单击左侧的“齿轮”图标,启动“设置”。您也可以按Windows+I快速打开设置。...

  • 发布于 2021-04-01 21:56
  • 阅读 ( 127 )

windows 10的新更新将再次删除用户的文件

微软上周发布了一个有缺陷的Windows10安全更新。某些Windows用户报告其桌面上的所有文件都已删除。以下是您需要知道的所有信息,包括如何修复错误并取回文件。 谢天谢地,这些文件实际上并没有被删除。更新刚刚将它们移动...

  • 发布于 2021-04-02 15:31
  • 阅读 ( 290 )

如何在Windows10中更改回收站设置

任何时候你在Windows中删除一些东西,它都会进入回收站。它一直放在那里,直到回收站达到预先配置的最大大小(或者直到你清空回收站),这时Windows会删除回收站中最旧的文件,为新文件腾出空间。这使您有机会在删除的文...

  • 发布于 2021-04-04 09:09
  • 阅读 ( 148 )

如何在安装Windows10的2019年5月更新后释放超过10gb的磁盘空间

...具清理硬盘 检查此处的其他设置。默认情况下,运行“回收站”时,Storage Sense还会删除“回收站”中超过30天的文件。 向下滚动并选中此处的“删除以前版本的Windows”选项。如果您在列表中没有看到此选项,则说明您已经删...

  • 发布于 2021-04-06 10:00
  • 阅读 ( 172 )

windows页面文件的最大大小是多少?

...己电脑上文件大小之前,究竟是好奇还是真正需要知道,Windows页面文件究竟能有多大?今天的超级用户问答文章对一个好奇的读者的问题有了答案。 今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,是一个...

  • 发布于 2021-04-07 20:10
  • 阅读 ( 158 )

如何利用windows10的存储感知自动释放磁盘空间

...加了一个方便的小功能,可以自动清理临时文件和存放在回收站一个多月的东西。下面是如何启用它。 相关:在Windows上释放硬盘空间的7种方法 windows10总是提供一些存储设置,您可以使用这些设置来帮助管理磁盘空间。storagesens...

  • 发布于 2021-04-08 01:20
  • 阅读 ( 157 )

windows readyboost值得使用吗?

将U盘连接到Windows计算机(即使在Windows 8上),Windows会询问您是否要使用ReadyBoost加速系统。但ReadyBoost究竟是什么,它是否真的会加速你的电脑呢? ReadyBoost是在windowsvista中引入的,在windowsvista中,它是一个高度提升的功能。不...

  • 发布于 2021-04-09 02:38
  • 阅读 ( 278 )

“砌砖”是什么意思?

...电和工作。 砖砌设备不能用正常方法固定。例如,如果Windows无法在您的计算机上启动,您的计算机就不会“阻塞”,因为您仍然可以在其上安装另一个操作系统。但是,如果您试图打开计算机电源,但它根本无**常工作,因此...

  • 发布于 2021-04-09 02:46
  • 阅读 ( 228 )

windows如何知道程序没有响应?

任何使用过Windows的人都会偶尔看到一条系统消息,指出某个程序没有响应,但Windows究竟是怎么知道的呢?今天的超级用户问答帖子回答了一位困惑的读者的问题。 今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个...

  • 发布于 2021-04-10 06:49
  • 阅读 ( 111 )
pbkm722603
pbkm722603

0 篇文章

相关推荐