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/
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.
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
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
Best Answer
In Mojave,
quicklookd
stores the information in the same private folder hierarchy: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:
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):The folder can't be accessed, neither by a standard user (even with
sudo
) nor by an administrator: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.