I have removed all my python code from the home directory, but when I do ls I get:

a11.py~ class1.pdf foobar.txt~ n1 pic.py~  

When I do ls like this: ls *.py I get:

ls: cannot access *.py: No such file or directory

I still have lot of files like the above. Are they hidden files or what?

How do I solve this?

  • "tradition" says that those files are auto saved file from emacs or vim. as a suffix ~ has no special meaning. – Archemar May 3 '16 at 12:43

The ~ is part of the filename:

ls *.py~

Thus, to delete all such files:

rm *~
| improve this answer | |

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.