forked from jasonfleming/pputils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clean_pputils.sh
executable file
·29 lines (20 loc) · 746 Bytes
/
clean_pputils.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
############################
echo "Deleting the following *.pyc files recursively ... "
# to list all files ending with *.pyc
find . -iname "*.pyc" -type f
# to delete them all
find . -iname "*.pyc" -type f -exec rm -rf {} \;
############################
echo "Deleting the following *~ files recursively ... "
# to list all files ending with *.pyc
find . -iname "*~" -type f
# to delete them all
find . -iname "*~" -type f -exec rm -rf {} \;
############################
echo "Deleting the following __pycache__ files recursively ... "
# to list all "__pycache__" directories
find . -iname "__pycache__" -type d
# to delete them
find . -iname "__pycache__" -type d -exec rm -rf {} \;
############################