[Sunhelp] du/dk differences
    Magnus Abrante 
    magnus.abrante at nocke.Sweden.Sun.COM
       
    Wed Jul 19 03:36:08 CDT 2000
    
    
  
Well, are you running as root? du will only count what the current user
has permissions to see.
The second thing is that "du -sk *" wont count directories / files
starting with a "." in the directory you start from. I would do a "du -sk ." 
instead.
Playing around with a .foobar directory:
click(/tmp/test):$ ls -a
./     ../    .hej/  a/
click(/tmp/test):$ du -ks *
10249   a
click(/tmp/test):$ du -ks .
20499   .
When doing du on a partition its also a good idea do add the -d flag,
which tells du not to go onto other filesystems than the current one.
Regards,
	//Magnus
> I have (somewhat) inherited an Ultra10 running Solaris 7.  The person who 
> built the system used the default Solaris file system structure.  This 
> gave their root file system 170 meg of space.  They are currently running 
> at 100% usage of the / file system according to df -k.  If I use du -sk * 
> from the / file system I show about 40-50 meg usage.  I know that df uses 
> the inode table to produce it's disk usage and is not always accurate.  
> This should be fixed whenever the system has been rebooted.  In this case 
> it is not.  Even after a reboot it shows 100% use by df -k.  Any ideas on 
> how I can get df -k to correct its self???
    
    
More information about the SunHELP
mailing list