Thank you both for your replys... I am no unix expert so please bear with me on this one.... I fully understand what you are saying in your responses below, but I don't completely agree with the implications.
First off, I'm persuing this because I'd like to make my life a little easier when reviewing drive usage; I'd like (need) a way to list summerized directory space used on a single filesystem for one level of directories (below the current, perhaps). For example if /home has a different filesystem than / and I'm at / then I'd like a response similar to; /bin 12234 /etc 23456 /home 1 ( directories use 1024 bytes) /var 34567 ... Where the totals are the sums of all lower subdirectories. Is there a way to do what I want, other than writing a fairly complex script? Ole, your statement "-x only skips the directories that are on different filesystems from the argument currently being processed.", very clearly addresses the area of confusion, but this is precisely the point I disagree with. In my (feeble) mind, in our example above, the argument, /home is a directory on the root filesystem, its contents are however on another filesystem. So I would rationalize that /home would be included, but not its contents. BTW: this is precisely how "find" interpets the situation, if I do a find -mount -maxdepth 16 from / I will get up to 16 subdirectory depths of all dirs except /home, but I do get /home listed as a directory of the root filesystem. Please, any suggestions on this fine point or a suggestion on how to accomplish the desired task.... TIA, Chirs Previous responses below; du is working just fine. What is happening is that the asterix is interpreted to mean each and every file that is visible, so du is actually excluding mounted filesystems some of the time -- only it is explicitly told to calculate the size of the filesystems mounted at a mount- point in your working directory. `du -sx .` should give no such problems. Hope that helps, Alan [EMAIL PROTECTED] From: [EMAIL PROTECTED] (Ole J. Tetlie) Date: 09 Apr 1999 09:43:27 +0200 With du 4.0 -x seems to work for me. Are you sure the problem isn't caused by using '*' ? For example, this machine has /home on a separate filesystem: When I do 'cd /; du -sx .' /home is not included becuse it is on a different filesystem from . but if I do 'cd /; du -sx *' /home will be included because the command is expanded to 'du -sx bin boot ... home ...' . This will first do a du on bin, then on boot, and eventually on home. Since home is on the same filesystem as itself it will not be skipped. -x only skips the directories that are on different filesystems from the argument currently being processed. ********************************************************************* Chris Brown [EMAIL PROTECTED] !!! HELP FIGHT SPAM !!! Join; www.cauce.org See; spam.abuse.net, spamsucks.com, www.cm.org ****************************************************************