Skip to content

Instantly share code, notes, and snippets.

@miki725
Created April 9, 2014 19:15
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 miki725/10304640 to your computer and use it in GitHub Desktop.
Save miki725/10304640 to your computer and use it in GitHub Desktop.
#!/bin/bash
path=$1
if [ -z $path ]; then
path=".";
fi
# when symlinks are present -delete cannot be used
# by passing all found files to rm via xargs
# allows to remove files even inside symlinks
find $path -name '*.pyc' -follow -print0 | xargs -0 rm -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment