0

I have stored a text as .txt while saving it in Gedit in Ubuntu 14.04.

But after viewing that folder, which i have stored will have two files with that name but with 'Tilde Symbol' '~' for an another file and it will be hidden!!!

Say 'a.txt' means the folder will contain '~a.txt' too, which can be viewed only by making them unhidden

Why is it so? What does it mean? Any Problem/Error with that?

How to Rectify it?

2 Answers2

3

Those are just backups of your original files that gedit creates before saving changes to your edited documents.

How to prevent this ?

In gedit preferences you need to disable Create a backup copy of file before saving, and if you want to automatic save your edits automatically set a timer with the option enable Autosave files every X minutes.

That way the ~ will be gone and your last changes will be saved on the file every x minutes in case something goes bad or your computer crashes.

The changes made to the file will be saved to the file itself and not to a temporary file.

Please be aware that if you delete the contents of a file and auto save is enable there will be a chance that you end up with a saved empty file.

Prashant Chikhalkar
  • 2,411
  • 2
  • 18
  • 25
0

The problem is pretty simple, actually. You can get to know it by viewing the properties of that file. It's a backup file for the text, a.txt for example. the ~a.txt stores the last save (probably) of the file (a.txt). You can delete the backup file (~a.txt) if you want to. For some small files this is unnecessary.

A.B.
  • 90,397
Chromium
  • 332