0
$\begingroup$

This question already has an answer here:

It happens all the time that I close my Mathematica session and later I regret that I have done so, because there are many things that I would like to check.

I would like to know if there is a way to store all the information of a Mathematica "session" in a file, for later use. Somehow, one should be able to use such file to restore the old session (not necessarily the previous one), without running the code again.

In Matlab, for example, there is the option of saving the current "workspace".

Important: I use Mathematica within Linux terminal, without a notebook interface. So, I am not interested in any solution dependent on the interface.

$\endgroup$

marked as duplicate by Szabolcs, rm -rf Feb 15 '14 at 5:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ Duplicate: Saving Mathematica kernel state? You can save/dump save all the global variables, if that's what you're asking. That's essentially what saving the current workspace does in MATLAB. However, you indicated that you're in the habit of closing first and thinking of saving later... neither dump save nor MATLAB's workspace save will help in this case. $\endgroup$ – rm -rf Feb 15 '14 at 4:06
  • $\begingroup$ Sorry, I couldn't find this thread before. DumpSave["state.mx", "Global`"] and then Get["state.mx"] should be exactly what I need. $\endgroup$ – fcpenha Feb 15 '14 at 4:09
  • $\begingroup$ It is indeed a duplicate. Sorry for that. $\endgroup$ – fcpenha Feb 15 '14 at 4:56

Browse other questions tagged or ask your own question.