
Exclude all .git or .svn folders from Spotlight index
I would like to exclude all the .git and .svn folders on my hardrive from the Spotlight index. I know I can manually add them through the GUI but since they are...
Mac OSXのSpotlightのインデックス除外リストの使い方を調べていた際のメモ。
TimeMachineが遅い際の対処方法のひとつとして(ただしこれが正しいとは限らない)、TimeMachineのローカルディレクトリのインデックス除外がありますが、以下の様なコマンドを実行してもいまいち除外されたのか分からないと思います。
sudo mdutil -i off "/Volumes/Time Machine バックアップ/Backups.backupdb"
でSpotlightの除外リストに設定しておけばいいのではないか、と思いそちらに設定しようとするとローカルのTime Machineディレクトリは設定できない旨を警告されます。
まぁこれを見るに除外するのは悪手なのだとは思いますが、ここは強引に設定する方法として以下の方法があることが分かりました。
特定のディレクトリの追加
sudo defaults write /.Spotlight-V100/VolumeConfiguration.plist Exclusions -array-add '/Volumes/Time Machine バックアップ/Backups.backupdb'
除外リストの表示
sudo defaults read /.Spotlight-V100/VolumeConfiguration.plist Exclusions
除外リストのリセット(1つずつの削除方法は分からず)
sudo defaults write /.Spotlight-V100/VolumeConfiguration.plist Exclusions -array
一応システム周りをいじるため、危険性を充分に認識した上で作業するようにしてください。
インデックス周りについては、何かと面倒くさい話が多いので、もしかしたらAlfredあたりを使用するのもいい方法なのでは無いかと思います。
Alfred - Productivity App for macOS
Alfred is a productivity application for macOS, which boosts your efficiency with hotkeys, keywords and text expansion. Search your Mac and the web, and control...
APPLE AirMac Time Capsule – 2TB ME177J/A
posted with AZlink at 2015.3.11
アップル
売り上げランキング: 1675
売り上げランキング: 1675