Hidden files on OSX
The Quickest Way to Show/Hide Hidden Files
Since the release of macOS Sierra, when in Finder, it is now possible to use the shortcut:
CMD + SHIFT + .
The long way to show hidden Mac OS X files
Run the following command to show hidden files:
% defaults write com.apple.finder AppleShowAllFiles TRUE;killall FinderRun the following command to hide hidden files:
% defaults write com.apple.finder AppleShowAllFiles FALSE;killall FinderDelete "garbage" files:
find . -name .svn -exec rm -rf {} \;
find . -name ".DS_Store" -depth -exec rm {} \;Delete existing Spotlight Index
% sudo rm -rfv /.Spotlight-V100Delete all ._ file?
% find . -name "._*" -exec rm '{}' ';'The ._ files are where osx puts the resource fork of a file if it's not on a HFS or HFS+ volume, eg, UFS, or Fat16/32 or NTFS (or any of the linux file systems).
Prevent MDS from attempting to Index
% sudo touch /Volumes/your volume name here/.metadata_never_indexDisable Indexing AND Searching of Volumes
% sudo mdutil -i off -d /Volumes/your volume name hereDisable creating '.ds_store' on USB volumes
% defaults write com.apple.desktopservices DSDontWriteUSBStores -bool trueDisable creating '.ds_store' on network volumes
% defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true