So this happened:
$ ls
''$'\342\200''abc2.16.5'
$ ls | od -c
0000000 342 200 a b c 2 . 1 6 . 5 \n
$ ls -il
76236897 -rw-rw-r-- 1 mob users 0 Aug 16 17:52 ''$'\342\200''abc2.16.5'
How do I delete this file? Here are some things that didn't work:
$ rm -i -- *
rm: remove regular file ''$'\342\200''abc2.16.5'? y
rm: cannot remove ''$'\342\200''abc2.16.5': No such file or directory
$ rm ./*
rm: cannot remove './'$'\342\200''abc2.16.5': No such file or directory
$ rm ./<TAB> # for file name completion
rm: cannot remove './'$'\342\200''abc2.16.5': No such file or directory
$ find . -delete
find: cannot delete './\342\200abc2.16.5': No such file or directory
$ perl -e 'unlink(glob("*")) or die $!'
$ perl -e 'unlink(glob("*2.16.5")) or die $!'
No such file or directory at -e line 1.
$ find . -inum 76236897 -delete
find: cannot delete './\342\200abc2.16.5': No such file or directory
$ rename * xxx ; rm -v xxx
rm: cannot remove 'xxx': No such file or directory
Curiously, truncate * --size 0
works, cat *
works, shred *
works
What should I try next? System is Red Hat Enterprise Linux Server release 6.8
rm -rf
should do that for you. – confetti Aug 16 '18 at 21:53rm -rf
empties a directory first and then deletes it. Sadly, also not working. – mob Aug 16 '18 at 21:54fsck
on the partition with the undeletable file? – Deltik Aug 16 '18 at 21:55