-
-
Save hbsdev/a17deea814bc10197285 to your computer and use it in GitHub Desktop.
Recursively remove all .pyc files and __pycache__ directories in the current directory.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# recursively removes all .pyc files and __pycache__ directories in the current | |
# directory | |
find . | grep -E "(__pycache__|\.pyc$)" | xargs rm -rf |
There is no need to invoke grep
, xargs
, or rm
. Try instead:
find . -regex '^.*\(__pycache__\|\.py[co]\)$' -delete
To make it simple, I made it as a file manager extension. you can go to folder and right click and select Remove PyCaches
option.
NO NEED OF ANY ARGS TO PASS.
EASY TO USE
Tool link (https://github.com/python-dev-tools/pycache-cleaner)
To make it simple, I made it as a file manager extension. you can go to folder and right click and select
Remove PyCaches
option.NO NEED OF ANY ARGS TO PASS.
EASY TO USETool link (https://github.com/python-dev-tools/pycache-cleaner)
This repo looks very suspicious. Why is there an executable in your repo @NanthagopalEswaran?
@littlebeeper, That's the installer.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to escape
$
if you intend to use this command in Makefilefind ./package | grep -E "(__pycache__|\.pyc$$)" | xargs rm -rf