Most efficient/fastest way to see disk usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi all,
I use this command to see disk usage:
du -cks * | sort -rn | while read size fname; do for unit in k M G T P
E Z Y; do if [ $size -lt 1024 ]; then echo -e
"${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done

The data itself is around 200GB with lots of subdir and small files.
The command takes for about 1 hour to finish.

Is there a faster way to see the disk usage of some directories?

Secondary objective is:
To see which directories have changes (added/remove subdir/files)
comparing to the previous data. I'm thinking of using "ls -laR" and
"diff".  But not sure.

Thank you.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux