Monday, February 1, 2010

What is Linux du Command? - ví dụ lệnh du

EXAMPLE:
  1. du -a images
    Output:
    12      images/daisy.jpg
    20 images/flo.gif
    76 images/CHILD.gif
    12 images/indigo.gif
    152 images/flower.gif
    12 images/sunflower.jpg
    12 images/tulip-flower-clipart5.gif
    12 images/flower.jpg
    8 images/thumbnail.aspx
    8 images/baby.jpg
    12 images/woodpecker.gif
    168 images/baby.gif
    8 images/thumbnail.jpg
    1012 images/house.bmp
    12 images/peacock.gif
    1544 images

    Displays the size of each file in the specified directory.

  2. du -s images
    Output:
    1544    images

    Displays the total disk space used by the specified directory.

  3. du -h
    Output:
    84K

    Displays the current folder capacity.

  4. du -h file1.php
    Output:
    8.0K file1.php

    Displays the storage capacity of file1.php.

No comments: