[NTLUG:Discuss] How does non-admin check for available disk space when...

Chris Cox cjcox at acm.org
Sat Jul 7 15:30:26 CDT 2007


Richard Geoffrion wrote:
> there is no access to read the table of mounted filesystems?
> 
> df doesn't work...so how does a regular user find out how much disk 
> space is available and/or in-use?   Well the in-use could be du....
> 

df DOES work.  The better question is why doesn't yours
work?? (puzzled)

But if it didn't work, you can see mounted
file systems by cat /etc/mtab or cat /proc/mounts, you
can get more info by cat /proc/partitions and
cat /proc/diskstats, but a lot of that is meant
to be read through various tools.

du is different from df.  df is the better way to see the
space available to a filesystem.  du can be used to examine
directory and file utilization for a directory, which doesn't
have to mean the same filesystem, so if you have a directory
called /company and have disk mounts underneath called
/company/north, company/south, etc. a du on /company could
show disk utilization across all even though the sub
directories are different mounted filesystems.



More information about the Discuss mailing list