If you are looking at file listings (ls) in Terminal on your Linux system, you may have seen duplicate files that end with a tilde (~). Such as having two files, notes.txt and notes.txt~, in the same directory.

I have found these to be quite annoying and have to manually remove them before I package up the files. I also didn’t know exactly where they came from until today.

I use Gedit to work on text files. It just so happens that every file that has a tilde duplicate was modified by Gedit. These files are automatic backups that are created before you save a modified file using Gedit.

To prevent Gedit from creating these backups in the future, open up Gedit, open up the Preferences dialog (Edit > Preferences), select the Editor tab, remove the check in the “Create a backup copy of files before saving” option, and click Close. After doing this, Gedit will no longer make the backups with tildes all over the place.

Did I help you?