2

Linux Mint 18.3 (based on Ubuntu Xenial)

This is a dual-boot machine with W10, which may be significant

I'm trying to delete some backintime jobs. Using rm -rf top-level-dir doesn't work: I get an unexpected message saying "directory not empty".

Drilling down into the offending directory, I get to:

mike@M17A /media/Shared/backintime/backintime/M17A/root/1/20180731-120001-297/backup/home/mike/.local/share/gvfs-metadata $  ls -lsa
total 13 
// TOTAL THIRTEEN??? WHY IS ONLY ONE FILE LISTED?
8 drwxrwxrwx 1 root root 8192 Oct 11 23:35 .
4 drwxrwxrwx 1 root root 4096 Oct 11 23:35 ..
1 -rwxrwxrwx 0 root root  200 May 27  2018 computer:
// OH DEAR, THE FILENAME ENDS WITH A COLON: LOOKS OMINOUS
// HERE I'M TRYING TO REMOVE THIS ONE FILE
mike@M17A /media/Shared/backintime/backintime/M17A/root/1/20180731-120001-297/backup/home/mike/.local/share/gvfs-metadata $  rm computer:
rm: cannot remove 'computer:': No such file or directory
mike@M17A /media/Shared/backintime/backintime/M17A/root/1/20180731-120001-297/backup/home/mike/.local/share/gvfs-metadata $  cat computer\: 
�meta&op�� [
�&0Khnemo-list-view-sort-columnnemo-list-view-sort-reversednemo-list-view-zoom-level���[
�'/���1falsenamemike@M17A /media/Shared/backintime/backintime/M17A/root/1/20180731-120001-297/backup/home/gvfs-metadata $  e
// HERE I'M TRYING TO MV IT TO A MORE SENSIBLE NAME (NOT ENDING IN COLON)
mike@M17A /media/Shared/backintime/backintime/M17A/root/1/20180731-120001-297/backup/home/mike/.local/share/gvfs-metadata $  mv computer: spot
mv: cannot stat 'computer:': Input/output error

I switch to root:

mike@M17A /media/Shared/backintime/backintime/M17A/root/1/20180731-120001-297/backup/home/mike/.local/share/gvfs-metadata $  su
Password: 
M17A gvfs-metadata # ls -lsa
ls: cannot access 'computer:': Input/output error
total 12
8 drwxrwxrwx 1 root root 8192 Oct 11 23:44 .
4 drwxrwxrwx 1 root root 4096 Oct 11 23:35 ..
? -????????? ? ?    ?       ?            ? computer:
// WELL I APPEAR TO HAVE DONE SOMETHING TO THIS "FILE" ... BUT WHAT?
M17A gvfs-metadata # rm computer
rm: cannot remove 'computer': No such file or directory
M17A gvfs-metadata # rm computer:
rm: cannot remove 'computer:': Input/output error
M17A gvfs-metadata # mv computer: spot
mv: cannot stat 'computer:': Input/output error
4
  • 2
    Sounds like an NTFS problem. There might be a mount flag to let you bypass certain protections...? Commented Oct 11, 2019 at 23:31
  • 1
    I guess, it's time to fsck that partition ... Commented Oct 12, 2019 at 7:16
  • 'Why 13?' see info ls then 'what information is listed' then the item for -l/--format=long/--format=verbose in the third paragraph. Note colon is prohibited in filenames in Windows but perfectly fine in Unix including Linux. Commented Oct 12, 2019 at 7:34
  • Thanks to all. Intend to reformat the drive. Commented Oct 12, 2019 at 12:54

1 Answer 1

6

This is an old solution, which means only old guys like me remember it.

Find the inode of the file with ls -i. Let's say it is 1611645009. Then in the directory you mention execute the command find $NAME_OF_DIRECTORY -inum 1611645009 -exec /bin/rm {} \;

If that doesn't do it, then I'm baffled too.

1
  • Thanks... ls -i in that dir gives: ls: "cannot access 'computer:': Input/output error / total 12" ... and "?"s as shown above..· Commented Oct 12, 2019 at 12:52

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.