我有一個全新的硬碟,格式化為 exFAT,我正在將資料夾移動到它,當我打開更多線程來複製檔案時,碰巧有些東西被損壞了。
我知道故障的目錄(它被卡住了,也許其中有數十萬個檔案)。我嘗試刪除它(已移至 mac 上的 .Trash 資料夾中)。
但無法刪除檔案。所以我拔掉了硬碟,以為沒有進程在運作。
現在:
sudo fsck_exfat -q /dev/disk1s2
報告檔案系統髒
sudo fsck_exfat -gd /dev/disk1s2
我看到它遍歷了 ./Thrashes/ 中列出的一長串文件
外部硬碟的資料夾
我想知道我是否可以這樣做:
rm -r ./Thrashes/*
刪除 thrash 中的所有文件,然後再次執行 fsck 以使流程更快。
或者最好避免並讓 fsck 完成,因為檔案系統是髒的?
我也偶爾會看到這樣的台詞:
Read offset = 0x000005200000 length = 0x040000
這意味著是一個錯誤,還是只是一個訊息?
這是我得到的日誌:
sudo fsck_exfat -gd /dev/disk1s2
Opening /dev/rdisk1s2
(S,"Checking volume.",0)
(S,"Checking main boot region.",0)
7813556224 total sectors; 512 bytes per sector
FAT starts at sector 32768; size 131072 sectors
15260532 clusters starting at sector 163840; 262144 bytes per cluster
Root directory starts at cluster 11
Read offset = 0x000001000000 length = 0x001000
(S,"Checking system files.",0)
Read offset = 0x000005240000 length = 0x040000
(S,"Volume name is %1$@.",1)
luigi4T
Found active bitmap; first cluster 2, length 1907567
(S,"Checking upper case translation table.",0)
Read offset = 0x000005200000 length = 0x040000
Found upcase table; starting cluster 10, length 5836
(S,"Checking file system hierarchy.",0)
Directory /
File /._.Trashes
Directory /.Trashes
Directory /.fseventsd
Directory /.Spotlight-V100
Directory /.TemporaryItems
Directory /20190318 BackUp
File /.com.apple.timemachine.donotpresent
File /._.com.apple.timemachine.donotpresent
File /._.TemporaryItems
File /.apdisk
File /._.apdisk
Read offset = 0x000005280000 length = 0x040000
Directory /.Trashes/501
File /.Trashes/._501
Read offset = 0x000005300000 length = 0x040000
File /.fseventsd/fseventsd-uuid
File /.fseventsd/0000000002073ca7
File /.fseventsd/0000000002089d5c
...
# files I'd like to remove from Thrashes folder, *before* running a files system check again
...
File /.Trashes/501/WatchDiscovery 10.01.36 AM/backup Jan 21, 2012/Posters_cleaned/mm2219_9_Assassinio_per_cause_naturali.jpg
File /.Trashes/501/WatchDiscovery 10.01.36 AM/backup Jan 21, 2012/Posters_cleaned/mm2219_imm_Assassinio_per_cause_naturali.jpg
File /.Trashes/501/WatchDiscovery 10.01.36 AM/backup Jan 21, 2012/Posters_cleaned/mm221_0_Accordi_sul_palcoscenico.jpg
File /.Trashes/501/WatchDiscovery 10.01.36 AM/backup Jan 21, 2012/Posters_cleaned/mm221_10_Accordi_sul_palcoscenico.jpg
File /.Trashes/501/WatchDiscovery 10.01.36 AM/backup Jan 21, 2012/Posters_cleaned/mm221_1_Accordi_sul_palcoscenico.jpg
File /.Trashes/501/WatchDiscovery 10.01.36 AM/backup Jan 21, 2012/Posters_cleaned/mm221_2_Accordi_sul_palcoscenico.jpg
File /.Trashes/501/WatchDiscovery 10.01.36 AM/backup Jan 21, 2012/Posters_cleaned/mm221_3_Accordi_sul_palcoscenico.jpg
File /.Trashes/501/WatchDiscovery 10.01.36 AM/backup Jan 21, 2012/Posters_cleaned/mm221_4_Accordi_sul_palcoscenico.jpg
.....
如果重要的話,Mac OS 版本 1.9.5
答案1
如果檔案系統被髒卸載,則無法確切知道檔案系統的資料結構可能存在不一致/損壞的內容(如果有的話),因此以讀取/寫入方式掛載它被認為是不安全的根本不直到它被 fsck 和修復。所以,不,在 fsck 之前以任何方式修改髒卸載的檔案系統都不被認為是安全的,即使您只是刪除先前移至垃圾箱的檔案。