6

I was wondering where does Google Chrome save pdf documents that it opens in the browser itself. I know those get deleted if we dont save them and close the browser.

I looked into chrome temporary folder at ~/.cache/google-chrome, but couldnt find any pdf there.

  • By the way, ~/.cache/google-chrome should normally retain files even after you close the browser. See mnot.net/cache_docs for more and exceptions. – DK Bose Feb 3 '15 at 13:38
6

It's in that directory, all right. Just uses a random string for filenames. Test it out:

find ~/.cache/google-chrome -type f -exec file {} + | grep PDF

For example:

$ find .cache/google-chrome/ -type f -exec file {} + | grep PDF
.cache/google-chrome/Default/Cache/f_004bf0:       PDF document, version 1.5
.cache/google-chrome/Default/Cache/f_004c01:       PDF document, version 1.4
  • thank you, I was actually searching with file names, so missed it – Jignesh Feb 3 '15 at 13:38
  • Just wondering... didn't it all use to be stored in the /tmp folder? – Ricky Robinson Jun 1 '15 at 13:44
  • @RickyRobinson not in the past couple of years, at least, I think. I've had problems with Chrome filling up student's quotas for at least that long. – muru Jun 1 '15 at 13:51
  • Does that find command search sub-directories? My ~/.cache/google-chrome/ folder has multiple sub-folders, each with multiple sub-folders, so I was wondering how deep it would search. I didn't find any PDF files, although I had just closed one, so is there anywhere else that Chrome might store files it's had open? – JamesBB Apr 26 '17 at 9:27
  • @JamesBB as you can see from the output, it went at least 3 subdirectories deep. find recurses by default, unless you used the -maxdepth option. – muru Apr 28 '17 at 4:40

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.