Guest User

Untitled

a guest
May 27th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # A recursive '.DS_Store' cleaner.
  4.  
  5. args=("$@")
  6. curdir="$(pwd)"
  7.  
  8. if [[ "$args" = "-h" || "$args" = "--help" ]]; then
  9. echo "dsclean.sh </path/to/directory>"
  10. exit 1
  11. elif [[ "$args" = "" || "$args" = " " ]]; then
  12. sudo find "$curdir" -name ".DS_Store" -depth -exec rm {} \;
  13. else
  14. sudo find "$args" -name ".DS_Store" -depth -exec rm {} \;
  15. fi
Add Comment
Please, Sign In to add comment