osx-rm-dir-metadata 261 B

12345678910111213141516
  1. #
  2. # Deletes .DS_Store and __MACOSX directories.
  3. #
  4. # Authors:
  5. # Sorin Ionescu <sorin.ionescu@gmail.com>
  6. #
  7. # function osx-rm-dir-metadata {
  8. find "${@:-$PWD}" \( \
  9. -type f -name '.DS_Store' -o \
  10. -type d -name '__MACOSX' \
  11. \) -print0 | xargs -0 rm -rf
  12. # }