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?

2 Answers2

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.

Grumbel
  • 4,879
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.

IQAndreas
  • 3,298