not-so-temporary files
hmm; I recently had the need to find where the “temporary” PDF was stored, as a result of selecting “Print > PDF > Open in Preview”, in an app - and found that it’s no longer simply in your user’s $TMPDIR
- so:
here’s a command-line to find recent ones and move them to the Trash, to review (and likely delete):
find $TMPDIR ~/Library/Containers/*/Data/tmp/TemporaryItems -type f -mtime -7 -iname \*.pdf\* -print0 | xargs -0 -r -L1 -t -I% mv -i % ~/.Trash/; open ~/.Trash/
(note: there may be several of the same name, and these will not overwrite each other, and thus not be moved - after disposing of previous results (as per your needs), run the command again. lather, rinse, repeat.)
—
it appears these dirs are not cleaned up on a schedule (though may be cleared via Safe Mode
), so files may linger here for quite some time - including, depending on what you “Print to PDF”, some that you may not want hanging around (ex: bank statement).
—
BTW: depending what apps you use, you may want to check what else is in these TemporaryItems
dirs:
find $TMPDIR ~/Library/Containers/*/Data/tmp/TemporaryItems -type f \! -name .DS_Store -ls
(as usual: caveat lector)