-
Notifications
You must be signed in to change notification settings - Fork 0
/
daily.disk.usage.sh
74 lines (74 loc) · 6.84 KB
/
daily.disk.usage.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
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
#=============================================================================
# Name : daily.disk.usage.script.sh
# Author : Aliquantulus
# Version : 0.01
# Date created: 16.12.2018
# Date last edited: 16.12.2018
# Creative Commons Licence : Attribution 3.0 Norway (CC BY 3.0 NO)
# Description : Daily summary of disk usage at home
#=============================================================================
echo "=============================================================================" >> /home/jk/du.logging/`date +"%y%m%d"`.t xt
# df -h | grep 'Filesystem\|video\|ds509' >> /home/jk/du.logging/`date +"%y%m%d"`.txt
df -h | grep Filesystem >> /home/jk/du.logging/`date +"%y%m%d"`.txt
df -h | grep video >> /home/jk/du.logging/`date +"%y%m%d"`.txt
df -h | grep ds509v1 >> /home/jk/du.logging/`date +"%y%m%d"`.txt
df -h | grep ds509v2 >> /home/jk/du.logging/`date +"%y%m%d"`.txt
df -h | grep ds509v4 >> /home/jk/du.logging/`date +"%y%m%d"`.txt
df -h | grep ds509v3 >> /home/jk/du.logging/`date +"%y%m%d"`.txt
echo "=============================================================================" >> /home/jk/du.logging/`date +"%y%m%d"`.t xt
du -sh /mnt/1812/volume1/video/tv >> /home/jk/du.logging/`date +"%y%m%d"`.txt
du -sh /mnt/1812/volume1/video/tv/* | sort -hr >> /home/jk/du.logging/`date +"%y%m%d"`.txt
echo "=============================================================================" >> /home/jk/du.logging/`date +"%y%m%d"`.t xt
du -sh /mnt/509/ds509v1/video/tv >> /home/jk/du.logging/`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v1/video/tv/* | sort -hr >> /home/jk/du.logging/`date +"%y%m%d"`.txt
echo "=============================================================================" >> /home/jk/du.logging/`date +"%y%m%d"`.t xt
du -sh /mnt/509/ds509v2/video/tv >> /home/jk/du.logging/`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v2/video/tv/* | sort -hr >> /home/jk/du.logging/`date +"%y%m%d"`.txt
echo "=============================================================================" >> /home/jk/du.logging/`date +"%y%m%d"`.t xt
du -sh /mnt/509/ds509v4/video/tv >> /home/jk/du.logging/`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v4/video/tv/* | sort -hr >> /home/jk/du.logging/`date +"%y%m%d"`.txt
echo "=============================================================================" >> /home/jk/du.logging/`date +"%y%m%d"`.t xt
du -sh /mnt/1812/volume1/video/movies >> /home/jk/du.logging/`date +"%y%m%d"`.txt
du -sh /mnt/1812/volume1/video/movies/* | sort -hr >> /home/jk/du.logging/`date +"%y%m%d"`.txt
echo "=============================================================================" >> /home/jk/du.logging/`date +"%y%m%d"`.t xt
du -sh /mnt/509/ds509v2/video/movies >> /home/jk/du.logging/`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v2/video/movies/* | sort -hr >> /home/jk/du.logging/`date +"%y%m%d"`.txt
echo "=============================================================================" >> /home/jk/du.logging/`date +"%y%m%d"`.t xt
du -sh /mnt/509/ds509v4/video/movies >> /home/jk/du.logging/`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v4/video/movies/* | sort -hr >> /home/jk/du.logging/`date +"%y%m%d"`.txt
du -sh /mnt/1812/volume1/video/tv >> /home/jk/du.logging/temp.tv.`date +"%y%m%d"`.txt
du -sh /mnt/1812/volume1/video/tv/* | sort -hr >> /home/jk/du.logging/temp.tv.`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v1/video/tv >> /home/jk/du.logging/temp.tv.`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v1/video/tv/* | sort -hr >> /home/jk/du.logging/temp.tv.`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v2/video/tv >> /home/jk/du.logging/temp.tv.`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v2/video/tv/* | sort -hr >> /home/jk/du.logging/temp.tv.`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v4/video/tv >> /home/jk/du.logging/temp.tv.`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v4/video/tv/* | sort -hr >> /home/jk/du.logging/temp.tv.`date +"%y%m%d"`.txt
echo "=============================================================================" >> /home/jk/du.logging/tv.`date +"%y%m%d" `.txt
df -h | grep Filesystem >> /home/jk/du.logging/tv.`date +"%y%m%d"`.txt
df -h | grep video >> /home/jk/du.logging/tv.`date +"%y%m%d"`.txt
df -h | grep ds509v1 >> /home/jk/du.logging/tv.`date +"%y%m%d"`.txt
df -h | grep ds509v2 >> /home/jk/du.logging/tv.`date +"%y%m%d"`.txt
df -h | grep ds509v4 >> /home/jk/du.logging/tv.`date +"%y%m%d"`.txt
df -h | grep ds509v3 >> /home/jk/du.logging/tv.`date +"%y%m%d"`.txt
echo "=============================================================================" >> /home/jk/du.logging/tv.`date +"%y%m%d" `.txt
cat /home/jk/du.logging/temp.tv.`date +"%y%m%d"`.txt | sort -hr >> /home/jk/du.logging/tv.`date +"%y%m%d"`.txt
du -sh /mnt/1812/volume1/video/movies >> /home/jk/du.logging/temp.movies.`date +"%y%m%d"`.txt
du -sh /mnt/1812/volume1/video/movies/* | sort -hr >> /home/jk/du.logging/temp.movies.`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v1/video/movies >> /home/jk/du.logging/temp.movies.`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v1/video/movies/* | sort -hr >> /home/jk/du.logging/temp.movies.`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v2/video/movies >> /home/jk/du.logging/temp.movies.`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v2/video/movies/* | sort -hr >> /home/jk/du.logging/temp.movies.`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v4/video/movies >> /home/jk/du.logging/temp.movies.`date +"%y%m%d"`.txt
du -sh /mnt/509/ds509v4/video/movies/* | sort -hr >> /home/jk/du.logging/temp.movies.`date +"%y%m%d"`.txt
echo "=============================================================================" >> /home/jk/du.logging/movies.`date +"%y% m%d"`.txt
# df -h | grep 'Filesystem\|video\|ds509' >> /home/jk/du.logging/`date +"%y%m%d"`.txt
df -h | grep Filesystem >> /home/jk/du.logging/movies.`date +"%y%m%d"`.txt
df -h | grep video >> /home/jk/du.logging/movies.`date +"%y%m%d"`.txt
df -h | grep ds509v1 >> /home/jk/du.logging/movies.`date +"%y%m%d"`.txt
df -h | grep ds509v2 >> /home/jk/du.logging/movies.`date +"%y%m%d"`.txt
df -h | grep ds509v4 >> /home/jk/du.logging/movies.`date +"%y%m%d"`.txt
df -h | grep ds509v3 >> /home/jk/du.logging/movies.`date +"%y%m%d"`.txt
echo "=============================================================================" >> /home/jk/du.logging/movies.`date +"%y% m%d"`.txt
cat /home/jk/du.logging/temp.movies.`date +"%y%m%d"`.txt | sort -hr >> /home/jk/du.logging/movies.`date +"%y%m%d"`.txt