Ubuntu – Where do files ending with a ~ come from

backupfilenamefiles

Sometimes duplicate filenames occur while working on Ubuntu which differ only by a ~ from the original filenames.

I know kate generates backup files and calls them your_file.py.swp. Is this something similar? If yes which program generates them? And why don't they disappear?

Best Answer

If you're using gedit to edit existing files, the default preference is to "Create a backup of files before saving". If you would like to change this default behavior, open gedit, then go up to the Menu bar and select Edit --> Preferences. Click on the Editor Tab, and Uncheck the box under File Saving in order to turn it off.

enter image description here

Another common ~ file creator is emacs - some would argue it's even more popular/common than gedit.

Related Question