{"id":3263,"date":"2020-12-29T10:47:28","date_gmt":"2020-12-29T02:47:28","guid":{"rendered":"https:\/\/www.aoisnow.net\/blog\/?p=3263"},"modified":"2020-12-29T10:47:28","modified_gmt":"2020-12-29T02:47:28","slug":"tont-32453-%e4%b8%ba%e4%bb%80%e4%b9%88%e5%9c%a8ntfs%e5%88%86%e5%8c%ba%e5%92%8cfat%e5%88%86%e5%8c%ba%e4%b8%8a%ef%bc%8c%e5%9b%9e%e6%94%b6%e7%ab%99%e6%96%87%e4%bb%b6%e5%a4%b9%e7%9a%84%e5%90%8d%e5%ad%97","status":"publish","type":"post","link":"https:\/\/www.aoisnow.net\/blog\/archives\/3263","title":{"rendered":"TONT 32453 \u4e3a\u4ec0\u4e48\u5728NTFS\u5206\u533a\u548cFAT\u5206\u533a\u4e0a\uff0c\u56de\u6536\u7ad9\u6587\u4ef6\u5939\u7684\u540d\u5b57\u4e0d\u4e00\u6837\uff1f"},"content":{"rendered":"<p>\u539f\u6587\u94fe\u63a5\uff1a<a href=\"https:\/\/devblogs.microsoft.com\/oldnewthing\/20060131-00\/?p=32453\" target=\"_blank\" rel=\"noopener\">https:\/\/devblogs.microsoft.com\/oldnewthing\/20060131-00\/?p=32453<\/a><\/p>\n<p>\u8bd1\u6ce8\uff1a\u539f\u6587\u7b2c\u4e00\u6bb5\u6bd4\u8f83\u957f\uff0c\u4e3a\u65b9\u4fbf\u9605\u8bfb\uff0c\u8fdb\u884c\u4e86\u624b\u5de5\u62c6\u5206\uff0c\u4eca\u540e\u518d\u6709\u7684\u7c7b\u4f3c\u60c5\u51b5\u5c06\u4e0d\u518d\u53e6\u4f5c\u5907\u6ce8\u3002<\/p>\n<p>On FAT drives, the directory that stores files in the Recycle Bin is called C:\\RECYCLED, but on NTFS drives, its name is C:\\RECYCLER. Why the name change?<\/p>\n<p>\u5728 FAT \u683c\u5f0f\u7684\u5206\u533a\u4e0a\uff0c\u5b58\u50a8\u56de\u6536\u7ad9\u6587\u4ef6\u7684\u76ee\u5f55\u53eb\u505a C:\\RECYCLED\uff0c\u4f46\u5728 NTFS \u683c\u5f0f\u7684\u5206\u533a\u4e0a\u5219\u53eb C:\\RECYCLER\u3002\u4e3a\u4ec0\u4e48\u4f1a\u6709\u8fd9\u79cd\u53d8\u5316\u5462\uff1f<\/p>\n<p>The FAT and NTFS Recycle Bins have different internal structure because NTFS has this thing called \u201csecurity\u201d and FAT doesn\u2019t. All recycled files on FAT drives are dumped into a single C:\\RECYCLED directory, whereas recycled files on NTFS drives are separated based on the user\u2019s SID into directories named C:\\RECYCLER\\S-&#8230;. (It has nothing to do with whether you are running English or Swedish Windows.)<\/p>\n<p>FAT \u5206\u533a\u548c NTFS \u5206\u533a\u4e0a\u7684\u56de\u6536\u7ad9\u7684\u5185\u90e8\u7ed3\u6784\u6709\u6240\u4e0d\u540c\uff0c\u56e0\u4e3a NTFS \u6587\u4ef6\u7cfb\u7edf\u6709\u4e00\u79cd FAT \u6587\u4ef6\u7cfb\u7edf\u6240\u6ca1\u6709\u7684\u529f\u80fd\uff0c\u53eb\u505a\u300e\u5b89\u5168\u5c5e\u6027\u300f\u3002\u5728 FAT \u683c\u5f0f\u7684\u5206\u533a\u4e0a\uff0c\u6240\u6709\u5220\u9664\u7684\u6587\u4ef6\u90fd\u88ab\u76f4\u63a5\u4e22\u8fdb\u4e86 C:\\RECYCLED \u76ee\u5f55\u91cc\uff0c\u800c\u5728 NTFS \u5206\u533a\u4e0a\uff0c\u56de\u6536\u7ad9\u5219\u6309\u7167\u7528\u6237\u7684 SID \u5c06\u5220\u9664\u7684\u6587\u4ef6\u4ee5 C:\\RECYCLER\\S-&#8230;. \u7684\u5f62\u5f0f\u533a\u522b\u5f00\u6765\uff08\u8fd9\u4e0e\u4f60\u7528\u7684\u662f\u82f1\u6587\u7248\u8fd8\u662f\u745e\u5178\u8bed\u7248\u7684 Windows \u6ca1\u6709\u5173\u7cfb\uff09\u3002<\/p>\n<p>Suppose the same directory name were used for both file systems, say, C:\\RECYCLED. Since it is possible to upgrade a FAT drive to an NTFS drive with the CONVERT utility, this means that a FAT drive converted to NTFS would have a FAT-style Recycle Bin after the conversion. But since the names are the same, the Recycle Bin says, \u201cHey, look, here\u2019s a C:\\RECYCLED directory. That must be my NTFS Recycle Bin!\u201d except that it isn\u2019t. It\u2019s a FAT Recycle Bin left over from the conversion. Giving the NTFS Recycle Bin a different name means that the Recycle Bin shell folder won\u2019t get confused by the \u201cwrong\u201d type of recycle bin directory structure on an NTFS volume.<\/p>\n<p>\u5047\u8bbe\u5728\u4e24\u79cd\u683c\u5f0f\u7684\u78c1\u76d8\u4e0a\uff0c\u56de\u6536\u7ad9\u6587\u4ef6\u5939\u7684\u540d\u5b57\u662f\u76f8\u540c\u7684\uff0c\u90fd\u662f C:\\RECYCLED\u3002\u9274\u4e8e\u7cfb\u7edf\u5141\u8bb8\u4f7f\u7528 CONVERT \u5de5\u5177\u5c06 FAT \u683c\u5f0f\u7684\u5206\u533a\u5347\u7ea7\u6210\u4e3a NTFS \u5206\u533a\uff0c\u8fd9\u5c31\u610f\u5473\u7740\u4ece FAT \u683c\u5f0f\u8f6c\u6362\u4e3a NTFS \u683c\u5f0f\u7684\u5206\u533a\uff0c\u5728\u8f6c\u6362\u5b8c\u6210\u540e\u5c31\u4f1a\u6709\u4e00\u4e2a FAT \u683c\u5f0f\u7684\u56de\u6536\u7ad9\uff08\u8bd1\u6ce8\uff1a\u4e0a\u6587\u6240\u8bf4\u7684\u76f4\u63a5\u5c06\u6587\u4ef6\u4e22\u8fdb\u53bb\uff0c\u4e0d\u6309 SID \u533a\u9694\u7684\u90a3\u79cd\uff09\u3002\u4f46\u7531\u4e8e\uff08\u56de\u6536\u7ad9\u7684\uff09\u540d\u5b57\u662f\u76f8\u540c\u7684\uff0c\u90a3\u4e48\u56de\u6536\u7ad9\u529f\u80fd\u4fbf\u4f1a\u8ba4\u4e3a\uff0c\u300e\u563f\uff0c\u770b\uff0c\u8fd9\u513f\u6709\u4e2a C:\\RECYCLED \u76ee\u5f55\uff0c\u8fd9\u80af\u5b9a\u662f\u6211\u4eec NTFS \u683c\u5f0f\u7684\u56de\u6536\u7ad9\u6ca1\u9519\uff01\u300f\uff0c\u800c\u4e8b\u5b9e\u4e0a\u5e76\u975e\u5982\u6b64\uff0c\u5b83\u53ea\u662f\u4e00\u4e2a\u8f6c\u6362\u540e\u9057\u7559\u4e0b\u6765\u7684 FAT \u683c\u5f0f\u56de\u6536\u7ad9\u800c\u5df2\u3002\u7ed9 NTFS \u683c\u5f0f\u56de\u6536\u7ad9\uff08\u76ee\u5f55\uff09\u4e00\u4e2a\u4e0d\u540c\u7684\u540d\u5b57\uff0c\u6709\u52a9\u4e8e\u4ee4\u56de\u6536\u7ad9\u529f\u80fd\u4e0d\u4f1a\u5728 NTFS \u683c\u5f0f\u7684\u5377\u4e0a\u5bf9\u300e\u9519\u8bef\u7684\u300f\u56de\u6536\u7ad9\u76ee\u5f55\u7ed3\u6784\u4ea7\u751f\u7591\u60d1\u3002<\/p>\n<p>Yes, the problem could have been solved some other way. For example, there could have been code to inspect the Recycle Bin directory to determine what format it is and ignore it if it didn\u2019t match the actual file system. (Or, if you\u2019re feeling really ambitious, somehow convert from one format to the other.) But that would be over-engineering. You have to write and test the detection (and possibly conversion) code, there\u2019s the risk of a false-positive, the code runs at every boot, and it needs to be maintained whenever either the FAT or NTFS recycle bin format changes. All for a scenario that happens at most once per drive.<\/p>\n<p>\u7684\u786e\uff0c\u8fd9\u4e2a\u95ee\u9898\u4e5f\u80fd\u901a\u8fc7\u5176\u4ed6\u65b9\u5f0f\u89e3\u51b3\u3002\u4f8b\u5982\uff0c\u56de\u6536\u7ad9\u529f\u80fd\u53ef\u4ee5\u65b0\u589e\u4e00\u6bb5\u4ee3\u7801\uff0c\u6765\u5224\u65ad\u76ee\u5f55\u5185\u7684\u683c\u5f0f\uff0c\u5e76\u5ffd\u7565\u4e0e\u5f53\u524d\u6587\u4ef6\u7cfb\u7edf\u4e0d\u76f8\u7b26\u7684\u60c5\u51b5\u3002\uff08\u53c8\u6216\u8005\u771f\u7684\u5f88\u6709\u96c4\u5fc3\u58ee\u5fd7\u7684\u8bdd\uff0c\u628a\u4e0d\u76f8\u7b26\u7684\u683c\u5f0f\u8f6c\u6362\u4e3a\u76f8\u7b26\u7684\u4e5f\u53ef\u4ee5\u3002\uff09\u4f46\u662f\u90a3\u6837\u5c31\u6210\u4e86\u8fc7\u5ea6\u5f00\u53d1\u7684\u6848\u4f8b\u4e86\u3002\u4f60\u5f97\u64b0\u5199\u76f8\u5173\u7684\u4ee3\u7801\uff0c\u5bf9\u68c0\u6d4b\u529f\u80fd\u8fdb\u884c\u6d4b\u8bd5\uff08\u53ef\u80fd\u8fd8\u5305\u62ec\u8f6c\u6362\u683c\u5f0f\u7684\u529f\u80fd\uff09\uff0c\u8fd9\u5176\u4e2d\u5b58\u5728\u5224\u65ad\u9519\u8bef\u7684\u53ef\u80fd\uff0c\u8fd9\u6bb5\u4ee3\u7801\u4f1a\u5728\u6bcf\u6b21\u7cfb\u7edf\u542f\u52a8\u65f6\u8fd0\u884c\uff0c\u5e76\u4e14\u6bcf\u6b21 FAT \u6216 NTFS \u6587\u4ef6\u7cfb\u7edf\u7684\u56de\u6536\u7ad9\u683c\u5f0f\u53d1\u751f\u53d8\u5316\u65f6\u90fd\u8981\u7ef4\u62a4\uff0c\u800c\u4ee5\u4e0a\u6240\u6709\u7684\u9ebb\u70e6\uff0c\u90fd\u53ea\u4e3a\u4e86\u4e00\u4e2a\u5728\u6bcf\u4e2a\u78c1\u76d8\u4e0a\u6700\u591a\u53ea\u4f1a\u53d1\u751f\u4e00\u6b21\u7684\u4e8b\u60c5\u3002<\/p>\n<p>Or you could change one text string and be done with it. (I could make some really awful \u201cGordian knot\u201d\/\u201dstring\u201d remark here but will refrain.)<\/p>\n<p>\u4e5f\u53ef\u4ee5\u9009\u62e9\u5c31\u4fee\u6539\u4e00\u4e2a\u5b57\u7b26\u4e32\uff08\u8bd1\u6ce8\uff1aRECYCLER \u548c RECYELED \u7684\u533a\u522b\uff09\u5c31\u641e\u5b9a\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u94fe\u63a5\uff1ahttps:\/\/devblogs.microsoft.com\/oldnewthing\/2006013 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-3263","post","type-post","status-publish","format-standard","hentry","category-tont_history"],"_links":{"self":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts\/3263","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/comments?post=3263"}],"version-history":[{"count":0,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts\/3263\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/media?parent=3263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/categories?post=3263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/tags?post=3263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}