Im using du -hs command to get the disk space utilization at my home directory and found that it to be taking long time to return the disk space(1.5TB). Is there any other way to retrieve the disk space quicker..?
so can we use df -k /home/dir instead of du -hs (run in home dir).I found both to give almost the same result, just to confirm can you say me the value under Used column for df -k command is in bytes or kilo bytes? If its KB then both the commands give the same output.
You will often get small differences between the figures for "du" and "df" due to sparse files and open files. Apart from being quicker, "df" is more accurate.
Most modern unix/Linux systems produce comparable output format with the command "df -Pk". See "man df" on your system.