Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I started to work in unix for couple of weeks ago and can very little about unix. Everytime I edit a file, a temp file~ appears in the filesystem. What does this mean? Can I just remove all these files? What can I do for removing these files automaticaly everytime I close the original file?


share|improve this question
What editor are you using? This question is editor specific and not unix specific . –  whaley Jun 10 '10 at 15:18
add comment

migrated from stackoverflow.com Jun 10 '10 at 17:32

This question came from our site for professional and enthusiast programmers.

2 Answers

Your editor is saving a backup copy of the file. You can safely remove them if you don't need them. Depending on your editor, it may be configurable to not save backup copies. Tell us which editor and we can possibly suggest how.

share|improve this answer
add comment

The ~ file is a backup (last save before your edits) automatically saved by emacs. You can disable these by adding the following bit of code to your .emacs file in your home dir:

(setq make-backup-files nil)
share|improve this answer
Might be vim. In that case, set noswapfile and set nobackup in the vimrc should do the trick. –  bernie Jun 10 '10 at 15:23
Hrmm... You may be right. Though I have never seen vim by default save to ~ files, only emacs. –  jer Jun 10 '10 at 15:39
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.