Although a bit simple for those out there used to hacking through a *nix filesystem, I always have a knack of forgetting the simplest commands and rely on google.com to help me remember how to do what I want. Today, I have spent a good deal of time making sure that I have duplicate backups of vital info. While I know there are detailed ways of comparing file data and making sure data was backed up thoroughly, a simple check I run when I am done moving data from one filesystem (i.e. ufs to hfs+, vfs, ext, fat, etc.) to another, I check directory sizes. Since I have never been a big gui buff on the FreeBSD side of things, I can't rely on the simple ctrl-click/right-click -> properties/info to check directory sizes - and I can never remember how to do this via the command line. So... for those of you who perchance got here via google.com, use the following commands to see the sizes of files and totals in a given directory (in this case, in the directory you are currently viewing):
- this gives you the total after paging through all subtotals, in human readable output - i.e. in megabytes/gigabytes
homeFS snfettig# du -c
- gives you the totals in machine numbers (i.e. not devided by 1024 bytes per megabyte)
Not many may need this reminder, but I do... and now I can go to my own website to refresh my memory ;) For more information, as always:
* By the way, this works on Linux, Freebsd, Mac OS X, etc.