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.

Some time while writing a program for example convert.c a file with same name followed by tiled(~) convert.c~ gets created in same directory. why is this so and whats really happening .please explain .

share|improve this question

migrated from stackoverflow.com Nov 27 '12 at 10:50

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

1  
which editor do you use? –  LouXiu Nov 27 '12 at 8:58

3 Answers 3

In Linux platform, when we use "vim" or "vi" swap file is created i.e. ".filename.c.swp".

Swap file allows an operating system to use hard disk space to simulate extra memory. When the system runs low on memory, it swaps a section of RAM that an idle program is using onto the hard disk to free up memory for other programs.

For more detailed description, please go through the below link,

http://kb.iu.edu/data/aagb.html

share|improve this answer

If you use Vim put this in your vimrc

set nobackup
set nowritebackup

If you use Emacs, put this in your .emacs.

(setq make-backup-files nil)

Then there is no backup file.

share|improve this answer

it's created by your c editor program It's created when you open your c file. it's a temporary file. and it should be removed when you close your editor

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.