Lazy alias to clean Python pyc's.
Bash and PowerShell aliases which recursively clean all .pyc files from a Python project for decluttering.
# Bash: alias clean-pycs='find . | grep -E -e ".+\.py[cod]" -e ".+/__pycache__" | xargs rm -rf' # PowerShell: Set-Alias -Name Clean-Pycs -Value "Get-ChildItem -Path .\ -Recurse -Include *.pyc -Include *__pycache__ | foreach ($_) { Remove-Item $_.FullName }"
That's all, folks!
Tweet