5

I noticed while working on my site through nano/terminal that ubuntu creates weird ~ files.

I've index.php~ etc.

I imagine this are backup files? is this correct? why does it do this? and how do I get rid of this functionality?

1

2 Answers 2

5

Yes, those are backup files, most Unix editors do that. You can disable them with:

unset backup

in your ~/.nanorc. See man nanorc for more information.

4
  • 4
    This will only deactivate it for the nano editor.. Don't be surprised if files with that ending will still be created - by other applications.
    – alfonx
    Oct 16, 2011 at 14:59
  • so how do I disable it systemwide?
    – user25389
    Oct 16, 2011 at 15:09
  • Why do you want to disable it systemwide? It seems like a good practice to me.
    – bbaja42
    Oct 16, 2011 at 15:22
  • it doesn't function correctly anyways. Right now index.php~ and index.php have same content - even though I edited out the main file.
    – user25389
    Oct 16, 2011 at 16:32
0

If you use GEdit (Ubuntu's default non-terminal text editor, and usually just shows up as named Text Editor), by default it also creates such backup files. To disable them, open the Tools > Preferences menu, switch to the Editor tab, and uncheck the "Create a backup copy of files before saving" checkbox.

You must log in to answer this question.