我创建了一个加密的稀疏束映像,用于存储一些我想在 Google Drive 中安全保存的文件。但是,我注意到,即使只是安装此映像并读取文件(简单文本文件),Google Drive 应用程序也会不断上传“更改”。为什么会这样?我只是对文件执行读取操作?更重要的是,有没有办法阻止这种情况?没有必要不断重新上传本质上没有变化的块。
关于此有什么提示或帮助吗?
答案1
这只是猜测,但当您查看文件/文件夹时,操作系统可能会更新其访问时间元数据。请尝试以只读方式安装包以避免这种情况。
--EDIT 尝试禁用时间更新和聚光灯索引。本教程适用于 SSD 驱动器,但我认为它们没有理由不适合您。
http://sysadmin.flakshack.com/post/9253439680/ssd-tweaks-for-mac-os-x
Disable file access time tracking
Normally the Mac will keep track of the last time any file was accessed. This contributes to the wear on the SSD drive, so it is helpful to disable it.
sudo touch /Library/LaunchDaemons/com.noatime.root.plist
Edit the file and paste the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.noatime.root</string>
<key>ProgramArguments</key>
<array>
<string>mount</string>
<string>-uwo</string>
<string>noatime</string>
<string>/</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Reboot and confirm the setting with:
mount | grep noatime
/dev/disk0s2 on / (hfs, local, journaled, noatime)
Adjust Spotlight settings
Spotlight is the Mac’s indexer and search tool. While a lot of people just disable this service (sudo mdutil -a -i off), I need Spotlight because Outlook 2011 uses it for searching my Outlook data.
To adjust this setting, go to System Preferences…Spotlight…Privacy. If you exclude directories that change frequently, you’ll save wear on your SSD. For example, I excluded:
/Library/Caches
~/Library/Caches
/Library/Application Support/Riverbed/Steelhead Mobile/datastore
~/Downloads
~/Documents/Parallels (where I store my VMs)