1

I'm using macOS Mojave beta and I'm trying to find out where Quick Look cache data is stored.

As of High Sierra, I found the Terminal command to open the path of Quick Look cache data:

open $TMPDIR/../C/com.apple.QuickLook.thumbnailcache/

This is what it looks like: dd

But when running Mojave beta, my Mac doesn't have any files in that path (I haven't cleared the cache at all and checked with qlmanage -r enable), I frequently used Quick Look though.

enter image description here

Quick Look works fine but I'd like to know why my Mac doesn't store cache data.

UPDATE

This is the output of command:

sudo lsof -c quicklookd

enter image description here

But I don't see anything in the directory via Finder.

/private/var/folders/ff/3m1y9syj5cd_vhjpgy0yy5c00000gn/C/com.apple.QuickLook.thumbnailcache/

If I tried it through Terminal. It says the issue in terms of permission. I have completely no idea what this permission comes from:

~ (166) $cd /private/var/folders/ff/3m1y9syj5cd_vhjpgy0yy5c00000gn/C/com.apple.QuickLook.thumbnailcache
cd: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted

/private/var/folders/ff/3m1y9syj5cd_vhjpgy0yy5c00000gn/C (171) $ls -l | grep quicklook
ls: com.apple.QuickLook.thumbnailcache: Operation not permitted
  • You could try the Terminal command sudo lsof -c quicklookd (type your login password when asked) to list which paths quicklookd is using (make sure you first perform a query with Quick Look). The thumbnails path is probably included in the list. – jaume Aug 22 '18 at 7:58
  • @jaume Thank you for response. The command you gave me does nothing. Please see the photo. – Traveholics Aug 22 '18 at 9:12
  • Have you performed a query before running the command (pressing Command-Space and typing something should suffice)? Otherwise quicklookd may not be running. – jaume Aug 22 '18 at 9:16
  • @jaume my apologies, I didn't look at your reply correctly. Now, I can see the result for lsof command. it looks it shows the path like $TMPDIR/../C/com.apple.QuickLook.thumbnailcache but I see nothing there.. I updated the screenshot. – Traveholics Aug 22 '18 at 9:21
  • Thanks for the screenshot and your comments, apparently Mojave has changed the permissions of the thumbnail cache folder to make it "private". You can list its contents with sudo ls -l /private/var/folders/ff/3m1y9syj5cd_vhjpgy0yy5c00000gn/C/com.apple.QuickLook.thumbnailcache. From lsof's output I'd say you will see several files there. – jaume Aug 22 '18 at 9:29
0

In Mojave, quicklookd stores the information in the same private folder hierarchy:

/private/var/folders/<id>/<random>/com.apple.QuickLook.thumbnailcache

as in High Sierra.

To list the exact folder name used in Mojave (this procedure also works in High Sierra), open a Finder window, select a document or application, press space to fire up Quick Look, launch Terminal and run:

sudo lsof -c quicklookd

lsof -c displays which files and folders are in use by a specific process. The result will look similar to this (the red circle highlights the private folder):

enter image description here

The folder can't be accessed, neither by a standard user (even with sudo) nor by an administrator: enter image description here

As you posted in your comment, the reason why you can't see its contents is because it is protected by System Integrity Protection. That's new in Mojave.

  • That sucks. Is there no way to clear the thumbnail cache, then? – SilverWolf Apr 23 at 13:34

You must log in to answer this question.

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