Backup of "untitled" file recoverable?

The answer might be different for different apps. (For example, TextEdit works with the O.S. to re-open files not "saved" even after a reboot, while LibreOffice does things much differently.)

If one has been working on a new document, and inadvertently closes the window without saving, how (if possible) would one find the partially complete file in a Time Machine backup? Or in a temporary local backup?


Solution 1:

It depends on the application, but a program like TextEdit, that you mention, names unsaved documents as "Untitled xx" where xx is a number. You can then search for that name to recover the document from backups.

For example on many systems the untitled document would be saved in:

~/Library/Mobile Documents/com~apple~TextEdit/Documents/Untitled xx.rtf

If you have a Mac where the system has been shut down, and open windows have been auto saved, and you're looking at the disk from a different Mac for recovery, you'll find the auto saved window information in:

~/Library/Containers/com.apple.TextEdit/Data/Library/Saved Application State/com.apple.TextEdit.savedState

However, those files are not immediately readable as RTF files. The easiest way to restore them is to place them there on another Mac, and then start up TextEdit to restore them.