Mar 09
Clean .DS_Store, .Trash, and ._resources files prior to copy
Cats: News|
Frequently we need to clean a directory before zipping it or copying it to an external USB drive to be used by Windows or Linux users.
Apple Finder has the custom of populating directories with those unavoidable .DS_Store files, volumes with .Trashes, and some files (especially pictures) with ._resources. The following interactive script will safely remove these files prior to copying.
Apple Finder has the custom of populating directories with those unavoidable .DS_Store files, volumes with .Trashes, and some files (especially pictures) with ._resources. The following interactive script will safely remove these files prior to copying.
#!/bin/sh # bash script to clean (delete) Finder .DS_Store, .Trashes and ._resources # Use cleandsstores.sh # juanfc 2010-03-06 if [ $# != 1 ] then echo "ERROR: use\n\t`basename $0` dirtoclean" exit 1 fi res=`find "$@" \( -name ".DS_Store" -or -name ".Trashes" -or -name "._*" \) -print` if [[ -z $res ]]; then echo "nothing to delete" exit 0 el...
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Leave a Reply
You must be logged in to post a comment.
Subscribe
