删除文件时会发生什么? [英] What happens when delete file?

查看:111
本文介绍了删除文件时会发生什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人告诉我,当你删除文件时它并没有真正被破坏



它只是添加类似&或$或〜之类的内容,如



如果你的文件是1.txt它会像~1.txt



这是正确的



添加到初始文件名的字符是什么



我可以使用ren命令添加它



如何完全销毁文件



如何防止文件恢复



我需要了解究竟发生了什么。

some one told me that when you delete file its not really destroyed

it just add something like& or $ or ~ to it like

if your file is 1.txt it will be something like ~1.txt

Is that right

What is the character added to initial file name

can I add it using ren command

how to destroy file totally

how to prevent file recovery

I need to understand what is exactly happen.

推荐答案

或〜就像



如果你的文件是1.txt它会像~1.txt



是吧



什么是添加到初始文件名的字符



我可以使用ren命令添加它吗



如何销毁文件完全



如何防止文件恢复



我需要你了解究竟发生了什么。
or ~ to it like

if your file is 1.txt it will be something like ~1.txt

Is that right

What is the character added to initial file name

can I add it using ren command

how to destroy file totally

how to prevent file recovery

I need to understand what is exactly happen.


这实际上取决于文件系统和文件的类型。破坏它的一种方法是用随机字节填充它,保持相同的确切大小。此外,由于磁盘具有剩余磁化,原则上可以读取新位以下,最好多次这样做。



问题最后删除文件比你想象的要复杂得多。例如:POSIX(也受Windows NTFS支持),您可以创建硬链接:目录树的不同位置的几个文件,但指向同一个物理单元。删除其中一个时,其他链接文件保持不变。当你删除最后一个链接(它们都不是主链接,它们都相等)时,文件最终被删除。但物理单位并没有真正被抹去,只是从某种结构中删除了对它的引用。请参阅: http://en.wikipedia.org/wiki/Hard_link [ ^ ]。这只是与文件系统API相关的一个方面。要深入细节,您应该分别学习每个文件系统;而且我不确定你是否需要。



-SA
It really depends on the file system and the kind of file. One way to destroy it is to fill it with random bytes, keeping the same exact size. Moreover, as the magnetic disk have residual magnetization which can be, in principle, read below the new bits, it's better to do it several times.

The problem of "final" removal of the file is much more complex than you may think. Just for example: POSIX (which is supported by Windows NTFS as well), you can create "hard links": several files in different places of the directory tree, but pointing to the same physical unit. When you delete one, other linked files remain the same. When you delete the last of the links (none of them is "main" one, they are all equal), the file is finally removed. But the physical unit is not really wiped, a reference to it is just removed from some structure. Please see: http://en.wikipedia.org/wiki/Hard_link[^]. This is only one aspect, as related to the file system API. To dig into detail, you should learn each file system separately; and I'm not sure if you have to.

—SA


我认为您正在寻找的答案取决于文件删除请求的方式,并且是以下选项之一:

(1)文件被移动到回收站,如果您打开垃圾箱,可以仔细阅读最近删除的文件,并将大部分文件恢复到文件系统中的原始位置。如果文件系统接近满,分配失败,系统会开始为您删除其中一些文件。通过资源管理器和某些第三方产品删除文件时,通常会执行此选择。 [这是默认的资源管理器行为,可以修改。]

(2)文件的标题被删除,因此该名称不再可用,但存储在该文件中的信息仍然存在在文件中。该文件的空间可能被另一个文件重用。这是删除文件时几乎所有软件通常做出的选择。在磁盘中搜索意外删除的文件(您想要返回)时,文件恢复软件会利用此技术。对于不同的文件系统,可以有不同的细节(例如,FAT,NTFS,FAT32,ext2,...)

(3)某些文件删除产品将采用您的文件(或磁盘)和擦除数据,有时多次写入数据,确保信息无法恢复。这不是默认操作,主要使用第三方产品(通常不是操作系统的一部分)来完成。例如,军用计算机通常会这样做。谢尔盖在解决方案#1中触及了这一点。
I think the answer you are looking for depends on how the file deletion request was made and is one of the following choices:
(1) The file is moved to the recycle bin, and if you open the bin, you can peruse recently deleted files and recover most of them to their original locations in the file system. If the file system gets close to being full such that allocations fail, the system starts deleting some of these files for you. This choice is typically exercised when deleting files through Explorer, and some third party products. [This is default Explorer behavior, which can be modified.]
(2) The file's header is removed, such that it is no longer available by that name, but the information stored in that file is still out there in the file. The file's space might be reused by another file. This is the usual choice made by almost all software when deleting a file. File recovery software takes advantage of this technique when searching your disk for files accidentally deleted (that you want back). There can be different details in this for different file systems (eg. FAT, NTFS, FAT32, ext2, ...)
(3) Some file deletion products will take your file (or disk) and erase the data, writing over it sometimes several times, making sure that the information is not recoverable. This is not the default action, and this is done mostly with third party products (not typically part of the operating system). Military computers typically have this done for example. Sergey touches on this in Solution #1.


这篇关于删除文件时会发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆