Skip to content

Instantly share code, notes, and snippets.

@AymenFJA
Forked from hbsdev/clean_py.sh
Created August 14, 2023 14:04
Show Gist options
  • Save AymenFJA/a2caeea3c4d8c8ecbf426b69fec511cc to your computer and use it in GitHub Desktop.
Save AymenFJA/a2caeea3c4d8c8ecbf426b69fec511cc to your computer and use it in GitHub Desktop.
Recursively remove all .pyc files and __pycache__ directories in the current directory.
#!/bin/sh
# recursively removes all .pyc files and __pycache__ directories in the current
# directory
find . | grep -E "(__pycache__|\.pyc$)" | xargs rm -rf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment