LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Backup "tilde" files (https://www.linuxquestions.org/questions/linux-newbie-8/backup-tilde-files-226213/)

jrdioko 09-03-2004 12:49 PM

Backup "tilde" files
 
I keep seeing backup files popping up everywhere that have a tilde appended to the end (e.g. filename.txt~ to backup filename.txt). I'd assume these are being created by vim as that is the editor I've been using to work with many of the files, but I can't seem to find anything in the documentation that describes it. Where are these files coming from and how can I change the settings for when/if backups are made? Thanks in advance.

J.W. 09-03-2004 01:12 PM

The "tilde" files are the previous version of the file. In other words, if you had a file that contained 10 lines of text, then removed 3 lines, the "tilde" file would still contain all 10 lines.

This is actually an incredibly useful safety valve in case you screw up an important file like XF86Config or fstab or whatever. These files are not being created on any sort of scheduled or automated process, they are created when you edit and save a file. -- J.W.

jrdioko 09-03-2004 01:41 PM

Ok, so was I correct that it's vim that's doing this? Is this part of the program, or is it something you could disable if you want (I want to keep it on, but I'm just curious how it works)? Thanks


All times are GMT -5. The time now is 03:18 AM.