#

## save

Save edit cell on disk

### Usage:

> save [filename]

> > where filename is a new name for the cell as well as the root name of the `.mag` file to be saved.

### Summary:

> The save command saves the current edit cell to disk. If filename is specified, then the layout will be saved to "filename`.mag`", and the current edit cell will be renamed to filename.

> The save command differs from writeall in several ways: save does not descend the hierarchy, and does not prompt the user for an action.

> As of magic version 8.3.549, if filename ends with ".tcl", then magic will save a script file containing a sequence of magic command-line commands that completely reproduces the file layout. The cell can then be regenerated by sourcing the script. This is not a substitution for a database (.mag) file, and magic will not normally search for or source these type of script files itself.

### Implementation Notes:

> save is implemented as a built-in command in magic.

### See Also:

> writeall

Return to command index

Last updated: March 7, 2020 at 1:06pm