Serveryje išnaudojamą disko vietą per direktorijas galite pasižiūrėti su šią komanda:
du -h --max-depth=1 {direktorija}
Pvz.
du -h --max-depth=1 / 693M /usr 7.0M /etc 4.0K /media 22M /lib64 7.6M /sbin 36K /home 0 /proc 4.0K /mnt 6.4M /bin 4.0K /selinux 12K /boot 52M /root 4.0K /dev 11M /lib 4.0K /opt 353M /var 4.0K /srv 0 /sys 32K /tmp 1.2G /
Matome kad /var direktorija užima 353M. Tikriname kas daugiausiai vietos užima /var direktorijoje:
du -h --max-depth=1 /var
23M /var/www 4.0K /var/cvs 4.0K /var/local 8.0K /var/empty 4.0K /var/nis 100K /var/run 4.0K /var/preserve 55M /var/lib 12K /var/db 4.0K /var/games 4.0K /var/opt 32K /var/named 25M /var/cache 4.0K /var/tmp 251M /var/log 80K /var/spool 4.0K /var/yp 8.0K /var/lock 353M /var
Toliau tikriname /var/log
du -h --max-depth=1 /var/log
4.0M /var/log/httpd 8.0K /var/log/mail 8.0K /var/log/samba 251M /var/log
Tikriname kiek užima atskiri failai /var/log direktorijoje su komanda ls -alh {direktorija}
ls -alh /var/log/ total 247M drwxr-xr-x 5 root root 4.0K Nov 23 04:02 . drwxr-xr-x 20 root root 4.0K Jul 10 23:17 .. -rw------- 1 root root 0 Jul 10 23:15 boot.log -rw------- 1 root utmp 105M Nov 24 09:05 btmp -rw------- 1 root utmp 68M Nov 1 03:59 btmp-20141101 -rw------- 1 root root 2.6K Nov 24 09:01 cron -rw------- 1 root root 15K Nov 2 04:02 cron-20141102 -rw------- 1 root root 14K Nov 9 04:02 cron-20141109 -rw------- 1 root root 14K Nov 16 04:02 cron-20141116 -rw------- 1 root root 14K Nov 23 04:02 cron-20141123 -rw-r--r-- 1 root root 0 Sep 22 10:58 dmesg -rw-r--r-- 1 root root 0 Jul 10 23:33 dmesg.old drwx------ 2 root root 4.0K Oct 16 17:49 httpd -rw-r--r-- 1 root root 144K Nov 24 08:57 lastlog drwxr-xr-x 2 root root 4.0K Jul 23 10:25 mail -rw------- 1 root root 9.3K Nov 23 20:26 maillog -rw------- 1 root root 30K Oct 31 10:34 maillog-20141102 -rw------- 1 root root 106K Nov 8 22:48 maillog-20141109 -rw------- 1 root root 72K Nov 15 19:04 maillog-20141116 -rw------- 1 root root 53K Nov 22 08:31 maillog-20141123 -rw------- 1 root root 11K Nov 24 08:57 messages -rw------- 1 root root 142 Oct 26 04:02 messages-20141102 -rw------- 1 root root 142 Nov 2 04:02 messages-20141109 -rw------- 1 root root 142 Nov 9 04:02 messages-20141116 -rw------- 1 root root 142 Nov 16 04:02 messages-20141123 -rw-r----- 1 mysql mysql 2.2K Sep 23 11:11 mysqld.log drwx------ 3 root root 4.0K Oct 15 16:07 samba -rw------- 1 root root 2.1M Nov 24 09:10 secure -rw------- 1 root root 11M Nov 2 03:51 secure-20141102 -rw------- 1 root root 4.6M Nov 9 03:44 secure-20141109 -rw------- 1 root root 20M Nov 16 03:58 secure-20141116 -rw------- 1 root root 37M Nov 23 03:59 secure-20141123 -rw------- 1 root root 0 Nov 23 04:02 spooler -rw------- 1 root root 0 Oct 26 04:02 spooler-20141102 -rw------- 1 root root 0 Nov 2 04:02 spooler-20141109 -rw------- 1 root root 0 Nov 9 04:02 spooler-20141116 -rw------- 1 root root 0 Nov 16 04:02 spooler-20141123 -rw------- 1 root root 0 Jun 3 2013 tallylog -rw-rw-r-- 1 root utmp 13K Nov 24 08:57 wtmp -rw------- 1 root root 16K Nov 24 08:57 yum.log
|