4

I think the title is self-explanatory but let me add more info:

Ubuntu 12.10 64bit

When I delete a file and then use graphical file manager (nautilus, nemo, etc...) the file does not appear to exist, which is what I expect when deleting a file. However, when I use terminal and look at files (using "ls" or "la" command) I can see the deleted files with "~" added after their names. For instance, a file named "Test.txt" will have a copy named "Test.txt~" after deletion.

Is this a bug? Why don't those files get deleted even after some time?

devav2
  • 36,312
Ba7a7chy
  • 539

1 Answers1

4

In Linux, files beginning with a dot are hidden files. A lot of commands (like ls) will not display these by default. In addition, Nautilus also hides files that end with a ~. These files generally are backup files created by text editors like Gedit.

If you want to delete these files in Nautilus, you need to view the hidden files first by pressing Ctrl+H or by clicking View, Show Hidden Files.

To permanently prevent gedit from creating backup files head to Edit --> Preferences --> Editor and remove the checkmark in front of Create a backup copy of file before saving:

enter image description here

Note: Please consider that backup files can be quite handy at times, so disabling them might not be the best idea.

Eric Carvalho
  • 54,385
Flimm
  • 41,766