Most efficient/fastest way to see disk usage
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} ${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@centos.org http://lists.centos.org/mailman/listinfo/centos |
Most efficient/fastest way to see disk usage
From: Fajar Priyanto <fajarpri@arinet.org>
> 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. Maybe something like: find / -exec stat -c "%i %a %u %g %s %Y %Z %n" '{}' ; > before then rerun after and diff...? JD __________________________________________________ __________________________________ Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos |
| All times are GMT. The time now is 05:44 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.