1

I've noticed this *~ file gets created (hidden) whenever I edit a file; usually text document, scripts. Is it some kind of backup?!? as it seems so... However, I don't have a backup service configured for such...

So, are those files backup files? ...like for contents or attributes? If yes, how can use to restore/recover what the file has to offer?

rusty
  • 16,327

2 Answers2

2

If you edit a file with emacs or gedtit usually those *~ backup files are generated. Say you edit a file named mytext.txt then it would create a file nemed mytext.txt~ which contains the buffer just before you edit it.

You can get back the un-edited version using in terminal

mv mytext.txt~ mytext.txt

It will revert back the changes. This happens for all the files that you can edit in text form.

I personally feel it quite annoying, to get rid of them you can set alias like,

alias cln='rm -i *~'
sourav c.
  • 44,715
1

Yes, this is a backup. Your editor creates these apparently, you can configure it not to do so.