Click here to Skip to main content
15,891,981 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using nano editor to develop bash script on Linux.
I am using bash -B option which makes a copy of the script

raspi-config-DEBUG.sh
raspi-config-DEBUG.sh~

Today I noticed I also have a ton of these files

raspi-config-DEBUG.sh.save
raspi-config-DEBUG.sh.save.1
raspi-config-DEBUG.sh.save.10
raspi-config-DEBUG.sh.save.11
raspi-config-DEBUG.sh.save.12
raspi-config-DEBUG.sh.save.13
raspi-config-DEBUG.sh.save.2
raspi-config-DEBUG.sh.save.3
raspi-config-DEBUG.sh.save.4
raspi-config-DEBUG.sh.save.9
raspi-config-DEBUG.sh.save.9.sh


I am curious which application is generating these files and when.

What I have tried:

I am asking a question about "save " file generation.
I am clueless and in no position to "guess" the answer or process to discover the answer.
Posted
Updated 24-Sep-18 19:25pm
Comments
Richard MacCutchan 24-Sep-18 13:44pm    
Most likely the editor itself. Check its setup options.
Vaclav_ 25-Sep-18 20:33pm    
While tracking other issue noticed this.
It looks as msbbox was not initialized properly,
however the output to the screen contained additional printable
"characters. I'll check the latest "save" file next to verify if
"Received SIGHUP or SIGTERM" generated it.
++ sudo nano /etc/network/interfaces
Received SIGHUP or SIGTERM
+ whiptail --title 'Command sudo nano /etc/network/interfaces output 1403' --sep' 17 80 10ut --scrolltext --msgbox '
+ echo 'STOP HERE 1413'
STOP HERE 1413

1 solution

From "man nano", the section NOTES:

In some cases nano will try to dump the buffer into an emergency file.  This will happen mainly if nano receives a SIGHUP
or  SIGTERM or runs out of memory.  It will write the buffer into a file named nano.save if the buffer didn't have a name
already, or will add a ".save" suffix to the current filename.  If an emergency file with that name already exists in the
current directory, it will add ".save" plus a number (e.g. ".save.1") to the current filename in order to make it unique.
In multibuffer mode, nano will write all the open buffers to their respective emergency files.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900