Mac owners have a habit of cluttering up disks that will be used on other
systems with files like .DS_Store ._.DS_Store and ._SOmeName.
Every time a folder is opened on a mac, at a minimum, a .DS_Store file
will be created.
The following commands are useful :
Code:
# cd to where ever your CF card is mounted on your mac
cd /Volumes/CFILIAD
# find all files with name .DS_Store and delete the rascals
# from the volume
find . -name \.DS_Store | xargs rm
# find all files in directorys in and below the current
# and remove all files that start with a ._
find . -name \._\* | xargs rm
# Remove all files and directories in directories in and below the current
# that look like .Trashes
find . -name \.Trashes | xargs rm -rf
Its is a good idea to drop off the xargs stuff first to see exactly
which files will be feed to xargs an then to the rm or rm -rf command.
Note the .Trashes files are directories and so one needs to add the -rf
to the rm command.
After you have cleaned up the card you can back it up to a folder
on your Mac by using a simple rsync command.
Code:
#!/bin/sh
# Note this does not delete files from the target
# Add --delete to delete files on the target that are not on the source
rsync -av --delete /Volumes/CFILIAD/ /Users/jerry/CardBackup
Please read the man pages before trying these commands...
Jerry