Created
November 6, 2014 02:14
-
-
Save zhangyangjing/ba7a20d31ad1d7060d70 to your computer and use it in GitHub Desktop.
clear mac ._* bash shell
This file contains hidden or 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 | |
#find . -name "._*" -exec rm {} \; | |
function clear() { | |
for file in `ls -A $1` | |
do | |
if [ -d $1/$file ] | |
then | |
clear $1/$file | |
else | |
if [[ $file = ._* ]] | |
then | |
echo rm$1/$file | |
fi | |
fi | |
done | |
} | |
clear $PWD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment