« Bluetooth SDIO compatible w/ Palm OS 5 - Where and When? | Main | PayPal Scam Warning »

FreeBSD/*nix Tip of the Day - using du

     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):

homeFS snfettig# du -ch

- 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:
homeFS snfettig# man du

* By the way, this works on Linux, Freebsd, Mac OS X, etc.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on November 15, 2003 10:08 PM.

The previous post in this blog was Bluetooth SDIO compatible w/ Palm OS 5 - Where and When?.

The next post in this blog is PayPal Scam Warning.

Many more can be found on the main index page or by looking through the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.