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

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

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

6  
What editor are you using? This question is editor specific and not unix specific . –  whaley Jun 10 '10 at 15:18

2 Answers 2

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

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
    
joe also used tilde-files for backups. –  Hennes Nov 15 at 15:58

Your Answer

 
discard

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