Advertisement
sauerCHAOS

Delete .DS_Store

Jul 15th, 2012
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.27 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. FILE=".DS_Store"
  4. echo "All \"$FILE\" files will be deleted, do you wish to continue? (y/n)"
  5. read ANS
  6. if [ "$ANS" = "y" ] ; then
  7.     echo "Removing files..."
  8.     find . -name "$FILE" -print0 | xargs -0 rm -rf
  9.     echo "Done."
  10. else
  11.     echo "Program terminated."
  12. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement