on 02-12-2012 4:37 AM
Dear experts:
could you let me know difference between df -h & du -sk * in linux
Hi,
df command Report how much free disk space is available for each mount you have.
You can use this command with different options to get your desired output.
Please check different options as below:
-a, --all include dummy file systems
-B, --block-size=SIZE use SIZE-byte blocks
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
-H, --si likewise, but use powers of 1000 not 1024
-i, --inodes list inode information instead of block usage
-k like --block-size=1K
-l, --local limit listing to local file systems
--no-sync do not invoke sync before getting usage info (default)
-P, --portability use the POSIX output format
--sync invoke sync before getting usage info
-t, --type=TYPE limit listing to file systems of type TYPE
-T, --print-type print file system type
-x, --exclude-type=TYPE limit listing to file systems not of type TYPE
--version output version information and exit
df -h will display in Kb, Mb, or Gb.
df -k Will use 1024-byte units, instead of the default 512-byte units, when writing space figures.
http://www.computerhope.com/unix/udf.htm
Reward points if found helpfull..
Best Regards,
Rajat Mandal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
ls- l output file size is in KB. But you can get a human readable format by using option h along with l in the command.
Example:
$ ls -l
-rw-r----- 1 ramesh team-dev 9275204 Jun 12 15:27 arch-linux.txt.gz*
$ ls -lh
-rw-r----- 1 ramesh team-dev 8.9M Jun 12 15:27 arch-linux.txt.gz
Best Regards,
Rajat Mandal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.