Answers:
您可以使用命令行实用程序fs_usage
来查找正在访问文件的应用程序。
要密切关注为此“jet.com”条目存储的文件,以下命令将显示文件名或路径中包含“https_jet.com”的所有文件的所有活动。
sudo fs_usage -f filesystem | grep "https_jet.com"
我建议运行此命令并尝试再次删除该条目。由于sudo
开头的命令,系统会提示您输入密码,但这是必要的,因为fs_usage
需要提升root权限。一旦您认为有足够的信息按住CTRL并点击,取消该命令C。
例如,在运行该命令并使用Safari的首选项窗格删除条目时,我得到以下条目,这些条目显示了Safari,WebKit,dbfseventsd和fseventsd对这些文件的活动。如果正在阻止删除这些文件或者正在重新创建它们,我希望您能看到一些可能有助于您识别罪魁祸首的内容。
00:58:59 unlink /Users/alistair/Library/WebKit/MediaKeys/https_jet.com_0 0.000010 Safari
00:58:59 getattrlist /Users/alistair/Library/WebKit/MediaKeys/https_jet.com_0 0.000003 Safari
00:58:59 rmdir /Users/alistair/Library/WebKit/MediaKeys/https_jet.com_0 0.000002 Safari
00:58:59 unlink /Users/alistair/Library/WebKit/MediaKeys/https_jet.com_0 0.000002 Safari
00:58:59 getattrlist /Users/alistair/Library/WebKit/MediaKeys/https_jet.com_0 0.000002 Safari
00:58:59 rmdir /Users/alistair/Library/WebKit/MediaKeys/https_jet.com_0 0.000002 Safari
00:58:59 open /Users/alistair/Library/Safari/Databases/___IndexedDB/https_jet.com_0 0.000042 com.apple.We
00:58:59 getattrlist /Users/alistair/Library/Safari/Databases/___IndexedDB/https_jet.com_0 0.000003 com.apple.We
00:58:59 rmdir /Users/alistair/Library/Safari/Databases/___IndexedDB/https_jet.com_0 0.000003 com.apple.We
00:58:59 open /Users/alistair/Library/Safari/Databases/___IndexedDB/https_jet.com_0 0.000004 com.apple.We
00:58:59 getattrlist /Users/alistair/Library/Safari/Databases/___IndexedDB/https_jet.com_0 0.000002 com.apple.We
00:58:59 rmdir /Users/alistair/Library/Safari/Databases/___IndexedDB/https_jet.com_0 0.000002 com.apple.We
00:58:59 HFS_update /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage 0.000008 Safari
00:58:59 HFS_update /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage 0.000002 Safari
00:58:59 HFS_update /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage 0.000013 Safari
00:58:59 HFS_update /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage-wal 0.000006 Safari
00:58:59 HFS_update /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage-wal 0.000002 Safari
00:58:59 HFS_update /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage-shm 0.000002 Safari
00:58:59 stat64 /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage 0.000025 Safari
00:58:59 HFS_update /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage 0.000005 Safari
00:58:59 HFS_update /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage 0.000003 Safari
00:58:59 unlink /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage 0.000194 Safari
00:58:59 unlink /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage-wal 0.000271 Safari
00:58:59 HFS_update /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage-shm 0.000004 Safari
00:58:59 HFS_update /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage-shm 0.000003 Safari
00:58:59 unlink /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage-shm 0.000070 Safari
00:58:59 stat64 /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage 0.000006 Safari
00:58:59 stat64 /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage-wal 0.000004 Safari
00:58:59 stat64 /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage-shm 0.000003 Safari
00:58:59 access /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage-shm 0.000020 dbfseventsd
00:58:59 access /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage-wal 0.000004 dbfseventsd
00:58:59 access /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage 0.000003 dbfseventsd
00:58:59 lstat64 /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage 0.000019 fseventsd
00:58:59 lstat64 /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage-wal 0.000003 fseventsd
00:58:59 lstat64 /Users/alistair/Library/Safari/LocalStorage/https_jet.com_0.localstorage-shm 0.000002 fseventsd