1

I'm trying to remove a dir on an SD card called MOMMA SCRIB.

It has a directory Raven that has a ton of nonsense files in it:

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??.???
????????.???  ????????.???  ???????.???   ????????.???

When I try to remove the dir:

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...

How can I get rid of this directory?

  • 1
    Why not just copy what you want off the card and format it? – Steve Wills Oct 10 '15 at 22:32
  • I saw similar weird files once on an unproperly re-mounted filesystem, after mounting it properly everything was ok – mazs Oct 10 '15 at 22:48
  • 3
    The error from rm says "Read-only file system". You need to mount the drive read-write. What does the output of mount say? – A.P. Oct 10 '15 at 22:50
  • Something is seriously wrong here. I'd ditch the drive (or stash it away for analysis). Your data is probably many times more valuable than the drive. – vonbrand Oct 10 '15 at 22:54
  • I agree with Steve and vonbrand. Copy what you want and then reformat. Don't mess around with a broken filesystem giving you garbage messages. – Wildcard Oct 11 '15 at 1:04
3

The error from rm says "Read-only file system".

  1. Perhaps the drive is not mounted properly, in which case do mount /dev/sdX -o remount,rw as root.

  2. Your drive may have filesystem errors. Copy your files elsewhere, unmount the drive, and run filesystem check. The utility to use for that would depend on the type of filesystem used.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.