What are '.save' files?

22,975

Solution 1

It is a nano emergency file where its buffer gets dumped. If your current file seems alright, you can delete the filename.save associated file.

From nano manual 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.

Solution 2

Are you using the Nano text editor? If so, this two links might help

The save file extension is associated with the command line text editor Nano that is a part of various Unix and Unix-based operating systems. The *.save file contains temporary saved text file. It is backup used to protect text document against system crashes. After the text is saved by user the temporary save file can be deleted.
reference: www.file-extensions.org

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.
reference: nano manual

Share:
22,975

Related videos on Youtube

αғsнιη
Author by

αғsнιη

SeniorDevOpsEngineer at #HUAWEI since March-2015 (#opentowork https://www.linkedin.com/in/-rw-r--r--) ʷⁱˡˡⁱⁿᵍ ᵗᵒ ˢᵉᵉ ʸᵒᵘ ⁱⁿ ᵃ ᵐⁱʳʳᵒʳ ᵐᵃᵈᵉ ᵒᶠ ᵐʸ ᵉʸᵉˢ # touch 'you ◔◡◔'

Updated on September 18, 2022

Comments

  • αғsнιη
    αғsнιη over 1 year

    I have been writing several bash scripts, and I have found that while writing them that extra copies of the files have been created which seem to be identical in contents to the normal files, except their extensions are .save, what are these files, why do I need them, and can I delete them as they are just clogging everything up? They also seem to have the same permission levels set on them as the files that they seem to be copies of.

    I am using nano as my editor.

    • psukys
      psukys about 9 years
      Most likely, the editor you're using to edit saves them as backup and doesn't cleanup on close.
    • Bakuriu
      Bakuriu about 9 years
      Note that this happen with many editors. Vim too does this as does kate (the extensions may differ).