Created
December 3, 2010 09:32
-
-
Save balibali/726768 to your computer and use it in GitHub Desktop.
Macで外部ストレージをumountする際に不要ファイルを削除するスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ ! -d $1 ]; then | |
echo "error" 1>&2 | |
exit 1 | |
fi | |
rm -rfv \ | |
"$1/.Spotlight-V100" \ | |
"$1/.Trashes" \ | |
"$1/._.Trashes" \ | |
"$1/.fseventsd" | |
sudo diskutil umount "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment