what are ~ files
When I am opening a file from Ubuntu GUI, then a similar file gets created in the same directory with a ~(tilde) at the end of the file name.
What are these files? I am asking this because I was told that these are not the files that are supposed to be there. I was also instructed to open files through terminal only. What's the catch? |
A ~ at the end of a file indicates a backup file. At least with BSD.
|
Itis the same in linux. Not all editors do that though, but many will create such a bacup file unless you tell the editor not to.
|
Quote:
Just opening files with a GUI doesn't create these ~ appended files, an editor does (sounds like vi(m) to me) http://vim.wikia.com/wiki/Remove_swa...king_directory |
Vi does it for sure, but so does gedit depending how it is setup by the distro
|
It's the editor creating automatic backups of your file as you edit it. Nothing to worry about, if you don't like them I'm sure your editor has a way to disable that functionality.
|
Emacs creates files like these as backups. But wait, it can get worse because if there's a problem, emacs creates # files. Ahhhh!!
All in all, I think several programs use the ~ symbol to designate a backup file as a protective measure for interim copies. These files are not intended for direct use by anyone. Unfortunately they also do not get cleaned up when editors leave, especially emacs for one. Quote:
(2) Or you're concerned or curious because you were told that the files in particular should absolutely not be there? The first rendition (1) would be normal and I feel you should not worry too much about them, however you can likely also delete them if you don't have any editors open. I would recommend that you just leave them there. The second rendition (2) would not be true, no one instructing you should be telling you that you'd never encounter these files. |
Quote:
Emacs does not create a # file if there is a problem. It is always created. The "#" prefix and sufix with emacs is for the autosave feature. When the original file is saved, that file *should* be deleted. If not, the next time the user opens that file emacs assumes it crashed last time around, and the user is prompted asking if they want to load the "recovered" data. |
Quote:
Right now I am using Ubuntu Mate 15 version. |
Quote:
Thanks for your kind attention to my post |
Quote:
|
Quote:
|
the very FIRST time you edit a system file and royally mess it up and the Operating System will no longer BOOT
is the VERY LAST time you will stop NOT having back up files and turn that ~ back on using "mv" to move that BACK UP config file to the original file is a LOT easier than trying to REMEMBER!!! what you did to a system file using "vi" or "nano" there is a REASON for BACKUP FILES |
Quote:
|
Quote:
Code:
$ man vi |
All times are GMT -5. The time now is 01:31 AM. |