# error removing file no such file or directory

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.

• Try to delete them in a terminal like this  rm /path/to/your/file and add any errors to your question – Mark Kirby Jun 22 '15 at 18:55
• I've tried. Command returns the same error. – Talha Javaid Jun 22 '15 at 19:06
• You did not provide the error that is what I want, please add it to your question – Mark Kirby Jun 22 '15 at 19:08
• the heading is the error . I have added it to the question too. – Talha Javaid Jun 22 '15 at 19:10
• Sorry I was expecting more from terminal – Mark Kirby Jun 22 '15 at 19:10

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

• I tried but rm returns the same error – Talha Javaid Jun 23 '15 at 14:02
• @TalhaJavaid remove all the files from desktop (except the one you want to delete) and run this cd ~/Desktop; \rm -i -- * – Edward Torvalds Jun 23 '15 at 14:57

Open a terminal and type:

rm or sudo rm remember this is for a file not a directory, if it's directory then rm -r, more detailed man rm.

Now when you typed rm command just drag&drop that file to a terminal, it will also print/show you a complete and correct path to that file, out of it you can notice if you made any mistakes when providing a path to a file before. And then just hit Enter that's it.

rm F[Tab-key]