Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 Jun 10 '10 at 17:32

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

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

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 '14 at 15:58

You must log in to answer this question.