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 .
migrated from stackoverflow.com Nov 27 '12 at 10:50
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
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,
If you use Vim put this in your vimrc
If you use Emacs, put this in your .emacs.
Then there is no backup file.