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?

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.

  • Thanks a lot @Prashant Chikhalkar. But using Gedit will be fine or any suggestion for an alternate of Gedit? – Sridhar Aug 10 '15 at 5:10
  • Does this answer helped you ? I'll check for other options too .. I'll update you once get something useful – Prashant Chikhalkar Aug 10 '15 at 5:24
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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.