I am attempting to write a php program in linux and I am using either blue fish or gedit. Both those programs are not saving the true name of the file "newaccount.php" but instead saving "newaccount.php~" Why is linux doing this and how can I get it to stop? Thank you.
This is the backup file before save. See https://help.ubuntu.com/community/gedit
Create Backup Copy: Edit → Preferences → Editor tab. This option is enabled by default and creates a copy of the file before saving changes. Backup files saved in this manner are appended with a trailing "~". If the user does not want gedit to back up files in this manner, deselect the option.
That is because
gedit automatically create a backup when you edit files.
Here I created a file called
[max@localhost ~/zzz]$ touch 1
ls -l it showing only one file that is
[max@localhost ~/zzz]$ ls -l total 0 -rw-rw-r-- 1 max max 0 Sep 27 18:39 1 [max@localhost ~/zzz]$ gedit 1
Now I opened the file with
gedit. And Entered the text "hello world" and saved.
After saving I typed
ls -l now it's showing two files
[max@localhost ~/zzz]$ ls -l total 4 -rw-rw-r-- 1 max max 12 Sep 27 18:40 1 -rw-rw-r-- 1 max max 0 Sep 27 18:39 1~
To Avoid this just follow this method
2.go to Edit > Preferences > Editor
Here just change
Create a backup copy of files before saving to
Autosave files every 1 minutes