Skip to main content

Recursively remove .DS_Store and ._* files from directly of shell script. Useful addition to the root directory of a project.

#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

find $DIR -name ".DS_Store" -print0 | xargs -0 rm -rf
find $DIR -name "._*" -print0 | xargs -0 rm -rf