error removing file no such file or directory
9,506
the name of the file must contain a non-printing character i.e. a character that is not printed even if is there.
you should try this:
ls -b <your file> | xargs rm
you should get the full name of that file by typing the first few letters then pressing tab
Related videos on Youtube
Author by
Talha Javaid
Updated on September 18, 2022Comments
-
Talha Javaid over 1 year
I am not being able to delete certain files with an error no such file or directory. A file on my desktop as well as a file in my movies folder is not being deleted.
I am 100% sure the problem isn't with the name of the file because I always use tab key to auto complete the name.
-
Talha Javaid almost 9 yearsI've tried. Command returns the same error.
-
kos almost 9 yearsPlease post the exact command you're running and the exact output
-
Bulrush almost 9 yearsCan you do
rm Final*.xlsx
? Does that work? I suspect the '+' signs are causing you trouble, which is why I only use letters, numbers, dash and underscore in a filename on every OS I use. Can you start up a GUI file manager and delete it that way? -
Talha Javaid almost 9 yearsno it didn't work
-
Bulrush almost 9 yearsDo this:
ls -l Final*.xlsx
and post the results to your original message. We need to see the owner and permissions. -
kos almost 9 yearsWhile in
~/Desktop
, typerm Final
than hit TAB to use auto-completion to match the exact filename and report back. If this doesn't succeed I fear you might have a corrupted filesystem. -
Mark Kirby almost 9 yearspossible duplicate of Unable to delete file - no such file or directory
-
Talha Javaid almost 9 yearsGUI desktop Gnome
-
-
Talha Javaid almost 9 yearsI tried but rm returns the same error
-
Edward Torvalds almost 9 years@TalhaJavaid remove all the files from desktop (except the one you want to delete) and run this
cd ~/Desktop; \rm -i -- *