Rm

刪除帶有無意義文件名的文件的目錄

  • October 10, 2015

我正在嘗試刪除名為MOMMA SCRIB.

它有一個目錄Raven,裡面有很多無意義的文件:

me@hackerspace-dev-vm /media/me/MOMMA SCRIB/Raven $ ls
ls: cannot access 
                 



/.: No such file or directory
ls: cannot access 

//.: No such file or directory
ls: cannot access 
                  




.
/: No such file or directory
???????.???  ????????.???  ????????.???  ????????.???  ????????.???
!???????.???  ????????.??!  ????????.???  ????????.???  ????????.???
????????.???  ????????.???  ????????.???  ??(?????.???  ????????.???
????????.???  ????????.???  ????????.(??  ??? ????.???  ????????.??6
????????.???  ????????.???  ????????.???  ???/??/?.???  ????????.?6!
????????.???  ????????.???  ????????.???  ????????.???  ????????.6??
????????.???  ????????.???  ????????.???  ???????/.???  ????????.?6?
????????.???  ????????.??!  ????????.???  ????????.?/?  ?????c??.???
????????.???  ????????.???  ????????.???  ???? ???.???  ?????K??.???
????????.???  ????????.???  ???????.???   ????????.???

當我嘗試刪除目錄時:

me@hackerspace-dev-vm /media/me/MOMMA SCRIB $ rm -rf Raven
rm: cannot remove ‘Raven/\n\n\n\n\n\n\n\n.\v\027\023/.173 Y12.1.0/Ç▄Æ|Ä¡î9.⌐^ç/83361\r\nG.1 x/ürëW\néyä.▐Çî’: Read-only file system
rm: cannot remove ‘Raven/\n\n\n\n\n\n\n\n.\v\027\023/.173 Y12.1.0/Ç▄Æ|Ä¡î9.⌐^ç/83361\r\nG.1 x/\022ü╢ê²\024â}.MÇú’: Read-only file system
rm: cannot remove ‘Raven/\n\n\n\n\n\n\n\n.\v\027\023/.173 Y12.1.0/Ç▄Æ|Ä¡î9.⌐^ç/83361\r\nG.1 x/αü≤çáyfä.ƒçà’: Read-only file system
rm: cannot remove ‘Raven/\n\n\n\n\n\n\n\n.\v\027\023/.173 Y12.1.0/Ç▄Æ|Ä¡î9.⌐^ç/83361\r\nG.1 x/ppå┐ü\aü═.\någ’: Read-only file system
rm: cannot remove ‘Raven/\n\n\n\n\n\n\n\n.\v\027\023/.173 Y12.1.0/Ç▄Æ|Ä¡î9.⌐^ç/83361\r\nG.1 x/é⌠ê6é»Pâ.ÿ?x/00 X89.0.9 y/.710 E92.7.6/61.868\r\n.g1’: Read-only file system
...etc...

我怎樣才能擺脫這個目錄?

來自rm“只讀文件系統”的錯誤。

  1. 可能驅動器未正確安裝,在這種情況下mount /dev/sdX -o remount,rw以 root 身份執行。
  2. 您的驅動器可能存在文件系統錯誤。將文件複製到別處,解除安裝驅動器,然後執行文件系統檢查。為此使用的實用程序取決於所使用的文件系統的類型。

引用自:https://unix.stackexchange.com/questions/235293