[Linux]檢查系統容量
[eric_tu@localhost
/]$ sudo du -h -x --max-depth=1
[sudo] password for
eric_tu:
53M ./etc
68M ./root
1.4M ./tmp
5.9G ./var
4.3G ./usr
7.0G ./home
0 ./media
0 ./mnt
0 ./opt
0 ./srv
0 ./backups
0 ./app2
18G .
------------------
[eric_tu@localhost
pineapple-vendor2]$ df -h
檔案系統 容量 已用 可用
已用% 掛載點
/dev/mapper/centos-root 18G
18G 64M 100% /
devtmpfs 2.2G 0
2.2G 0% /dev
tmpfs 2.2G 0
2.2G 0% /dev/shm
tmpfs 2.2G 8.8M
2.2G 1% /run
tmpfs 2.2G 0
2.2G 0% /sys/fs/cgroup
/dev/sda1 497M 307M
191M 62% /boot
tmpfs 438M 0
438M 0% /run/user/1000
[eric_tu@localhost
pineapple-vendor2]$ du -sh /usr/* |grep G
1.3G /usr/lib
du: 無法讀取目錄
‘/usr/libexec/initscripts/legacy-actions/auditd’ 的內容: 拒絕不符權限的操作
^C
[eric_tu@localhost
pineapple-vendor2]$ sudo du -sh /usr/* |grep G
[sudo] password for
eric_tu:
1.3G /usr/lib
------------------
[eric_tu@localhost
~]$ du -sH ./*
20612 ./20170929_log.txt
1456 ./500.log
112 ./All-Projects
4 ./authorized_keys
687980 ./backup
1496 ./bash
4 ./bashrc
116 ./bin
4 ./check
0 ./curl
92336 ./d2backup
468 ./docker-elk-tutorial
9500 ./DoctrineToutorial
------------------
[eric_tu@localhost
logs]$ du -h
4.0K ./prod/background_process
7.6M ./prod
0 ./test
0 ./reop
0 ./geoip_block
63M ./dev
399M .
------------------
[eric_tu@localhost
logs]$ df -h
檔案系統 容量 已用 可用
已用% 掛載點
/dev/mapper/centos-root 18G
17G 1.1G 94% /
devtmpfs 2.2G 0
2.2G 0% /dev
tmpfs 2.2G 0
2.2G 0% /dev/shm
tmpfs 2.2G 8.8M
2.2G 1% /run
tmpfs 2.2G 0
2.2G 0% /sys/fs/cgroup
/dev/sda1 497M 307M
191M 62% /boot
tmpfs 438M 0
438M 0% /run/user/1000
留言
張貼留言