-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbigfilecleanup.sh
63 lines (52 loc) · 1.25 KB
/
bigfilecleanup.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
#House Keeping Script! 9/06/2017 -Fonix
#Variables
SIZE="1G" #File Size Limit
LOC="/srv/daemon-data/" #Location for search
EXT1="*.tar.gz" #Extension 1
EXT2="*.log" #Extension 2
EXT3="*.zip" #Extension 3
sleep 1
echo ""
echo ""
echo ""
echo "--------------------------------------"
echo "Digital Hazards House Keeping Scripts!" #<-- Its so pretty <3 :D
echo "--------------------------------------"
echo ""
echo ""
echo ""
sleep 2
#Param Task One
echo "Starting search for files bigger than $SIZE with the file extension $EXT1"
find $LOC -size +$SIZE -name "$EXT1" -exec rm -f {} \;
echo "Done!"
echo ""
echo ""
echo ""
sleep 2
#Param Task Two
echo "Starting search for files bigger than $SIZE with the file extension $EXT2"
find $LOC -size +$SIZE -name "$EXT2" -exec rm -f {} \;
echo "Done!"
echo ""
echo ""
echo ""
sleep 2
#Param Task Three
echo "Starting search for files bigger than $SIZE with the file extension $EXT3"
find $LOC -size +$SIZE -name "$EXT3" -exec rm -f {} \;
echo "Done!"
echo ""
echo ""
echo ""
sleep 2
echo ""
echo ""
echo ""
echo "--------------------------------------"
echo " Script Complete! Thank you very much!" #<-- I think im addicted to these <3 :D
echo "--------------------------------------"
echo ""
echo ""
echo ""