I had a Terminal window with 7 or 8 tabs with a lot of history and long scrollback, with resume set to 10000 rows, that was always persisting between sessions. I have accidentally closed the window instead of quitting the Terminal app and I have lost this setup. I have a time machine backup from the day before. Is there a way to restore my tabs with their histories?

I have found these two possibly related Q&A, but I can’t figure out how to use that info to restore my tabs:

1 Answer 1


The saved state of Terminal is stored in this folder.

~/Library/Saved Application State/com.apple.Terminal.savedState/

Quit Terminal, copy the contents of this folder from your backup, then open Terminal.

  • :-( Saved Application State doesn’t appear to be part of Time Machine Backup… I guess that’s it then?
    – Palimondo
    May 23, 2018 at 16:06
  • @Palimondo Oops, didn't think to check that; do you use APFS and have a snapshot you can roll back to?
    – grg
    May 23, 2018 at 16:09
  • Nope, just upgraded to High Sierra yesterday and I’m still on HFS+.
    – Palimondo
    May 23, 2018 at 16:10
  • So, I have now saved a copy of .bash_sessions and com.apple.Terminal.savedState in hopes that something can be done to restore the tabs. But I cannot find any keys in the windows.plist that would match some IDs from sessions. The data.data, window_1.data and window_2.data seem inscrutable at first glance, but weighing at 143 KB, 5 KB and 204 KB respectably, I’m hoping they contain the scrollback rows. Any clues about their format?
    – Palimondo
    May 23, 2018 at 16:28
  • 1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .