tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Filesystem limits



On 16 Jan 2010, at 22:12, Sad Clouds wrote:
> Is there a portable way of finding out the limits for the maximum number of 
> files and directories ...

As far as I know most file-system don't differentiate between directories
and directories in that regard.

> that can be created under a give directory?

statvfs(2) will provide you with a "struct statvfs" which e.g. contains
these fields:

             fsfilcnt_t      f_files;  /* total file nodes in file system */
             fsfilcnt_t      f_ffree;  /* free file nodes in file system */
             fsfilcnt_t      f_favail; /* free file nodes avail to non-root */
             fsfilcnt_t      f_fresvd; /* file nodes reserved for root */

Please have a look statvfs(5) ("man 5 statvfs") for more details.

        Kind regards

-- 
Matthias Scheler                           http://zhadum.org.uk/




Home | Main Index | Thread Index | Old Index