Skip to content

Instantly share code, notes, and snippets.

@wanderer
Created February 14, 2014 02:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wanderer/8994736 to your computer and use it in GitHub Desktop.
Save wanderer/8994736 to your computer and use it in GitHub Desktop.
#!/bin/bash
# removes orphaned appledouble files
# by null_radix
DIR="/path/to/dir"
cd $DIR
for i in ./._*
do
FILE=${i:4}
if [ ! -f $FILE ]; then
echo "removing $i"
rm $i
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment