Skip to content

Instantly share code, notes, and snippets.

@kazuhisya
Created March 1, 2020 07:44
Show Gist options
  • Save kazuhisya/ea889b6c9f4bd8121982db7283f41c67 to your computer and use it in GitHub Desktop.
Save kazuhisya/ea889b6c9f4bd8121982db7283f41c67 to your computer and use it in GitHub Desktop.
find-dsstore
#!/bin/sh
find . -name ".DS_Store" -print ; find . -name "._*" -print ;
echo "削除しますか? [Y/n]"
read ANSWER
ANSWER=`echo $ANSWER | tr y Y | tr -d '[\[\]]'`
#echo $ANSWER
case $ANSWER in
""|Y* ) find . -name ".DS_Store" -print -exec rm -r {} ";" ; find . -name "._*" -print -exec rm -r {} ";";;
* ) echo "exit";;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment