µ±Ç°Î»ÖãºLinux½Ì³Ì - LinuxÎÄ»¯ - ·ÖÎöÓ²Å̵ĿռäÕ¼ÓÃÇé¿ö,ºÜÓÐÓü¸¸öÃüÁî

·ÖÎöÓ²Å̵ĿռäÕ¼ÓÃÇé¿ö,ºÜÓÐÓü¸¸öÃüÁî


Ҳû¹ý¶à³¤Ê±¼ä£¬Ó²ÅÌ¿Õ¼ä¾Í¿ªÊ¼±¨¾¯ÁË ....¿´À´ÊÇÐèÒª·ÖÎöÒ»ÏÂÓ²Å̵ĿռäÕ¼ÓÃÇé¿öÁË.

Linux ÏÂ×Ô´ø du ÃüÁ¶Ô·ÖÎö¿Õ¼äÎÊÌâ±È½ÏÓÐÓõIJÎÊýÊÇ: ÏÔʾ×ÜÊý -s BiFF:/home # du -s /domain 101040 /domain

Õâ¸ö¿´µÄ²»Ôõô×ÔÈ»£¬ÒòΪwinÏÂÃæ¿´ MB,GB ¶¼ÒѾ­Ï°¹ßÁË, ÔÙÊÔÊÔ£º -h BiFF:/home # du -sh /domain 99M /domain

Ò»¸ö¸öµÄ¿´µ±È»ÀÛ£¬ÏÞÖÆÉî¶ÈÒÔºóÏÔʾȫ²¿ÄÚÈݾÍÇáËɶàÁË£¬ ÏÞÖÆÉî¶ÈÊÇ --max-depth BiFF:/home # du -h --max-depth=1 /local/home 358M /local/home/biff 360M /local/home/informix 718M /local/home ÏÔʾÁ½²ã£¬¼òµ¥¹ýÂËÒ»ÏÂÖ»ÏÔʾMBºÍGB´óСµÄ£¬Ö»ÓÐKB´óСµÄ¾Í²»ÏÔʾÁË£º BiFF:/home # du -h --max-depth=2 /local/home | grep £ÛMG£Ý 106M /local/home/biff/hz 84M /local/home/biff/.wine 28M /local/home/biff/.mozilla 1.9M /local/home/biff/.gnome2 1.1M /local/home/biff/Desktop 8.0M /local/home/biff/.thunderbird 13M /local/home/biff/.MyPilot 19M /local/home/biff/.thumbnails 3.9M /local/home/biff/.adobe 2.2M /local/home/biff/.yast2 7.5M /local/home/biff/.ooo-2.0-pre 77M /local/home/biff/WorkSpace 358M /local/home/biff 49M /local/home/informix/bin 151M /local/home/informix/smis 152M /local/home/informix/isa_setup 7.9M /local/home/informix/b_dcc_crcrdcrd 1.1M /local/home/informix/.mozilla 360M /local/home/informix 718M /local/home

¿´ÁË¿´£¬isa_setup ºÍ .thumbnails Ŀ¼ÓеãÒì³££¬È¥ÇåÀíÇåÀí.....

µ±È»£¬ÕâÖ»ÊǸö Demo ,ÕæÕýʵÓõĻ¹ÊǶԸùϵͳµÄ¼ì²é£¬ mount ²é¿´¼ÓÔØÁ˼¸¸ö·ÖÇø du xxx ²é¿´¸÷Ŀ¼¿Õ¼äµãÓÃÇé¿ö

Èç¹û du ÓõÄʱ¼äÌ«³¤µÄ»°¿ÉÒÔ¿¼ÂÇ nohup du -s --max-depth=2 / | grep [MG] > /result.txt &

·Åµ½ºǫ́ȥÅÜ.

nohup ±íʾÓû§Í˳öÒ²²»Í£Ö¹ & ÊǷŵ½ºǫ́ȥ > Èýá¹û±£´æµ½ÎÄÀïÃæÈ¥