Where does Mac OS X store TextEdit's unsaved documents?
I want to programmatically:
- increase/decrease that size
- flush the cache
- provide configuration option to control the frequency of auto saving/caching
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this communityWhere does Mac OS X store TextEdit's unsaved documents?
I want to programmatically:
For Lion: It is in ~/Library/Containers/com.apple.TextEdit/Data/Library/Autosave\ Information/
, e.g. Unsaved TextEdit Document.rtf
.
Note that ~/Library is not visible by default in Finder in Lion, but you can access it by pasting the path in Finder (without the backslash in "Autosave Information"; the formatting above is for cd-ing in Terminal.app), or there is an option to enable the visibility (chflags nohidden ~/Library
)
For Snow Leopard (credit goes to @binarybob, his comment is below) it is in ~/Library/Autosave Information
also named Unsaved TextEdit Document.rtf
~/Library
and not /Library
? Finally, try to create unsaved document in Text Edit, and see if the directory appears; it may not be there by default.
– lupincho
Apr 18 '12 at 6:54
~/Library/Containers/com.apple.TextEdit/Data/Library/Autosave Information
, and what a surprise ! I find about 40 documents stored. In TextEdit I have only 13 documents. In resuming the sessions, week after week, TextEdit has lost many other documents — I have not closed them. The good news is that these documents did not get deleted. The bad news is that TextEdit forgot to restore many of these documents.
– Nicolas Barbulesco
Jul 19 '14 at 11:04
Note: For macOS Mavericks, the path is slightly different. It's ~/Library/Containers/com.apple.TextEdit/Data/Documents
.