On Thu, Mar 10, 2005 at 03:49:10PM -0500, nathan r. hruby wrote: > This seems kinda like a kludge. Anyone have any better suggestions for > monitoring the number of files in a directory?
If the following conditions are met: * you're running solaris * /var/spool/mqueue is a filesystem unto itself ...you can run 'df -g' to dump out the statvfs struct (Solaris' 'df' only): # /bin/df -g / / (/dev/dsk/c0t0d0s0 ): 8192 block size 1024 frag size 4107210 total blocks 3980428 free blocks 3857212 available 344448 total files 341961 free files 8388608 filesys id ufs fstype 0x00000004 flag 255 filename length Then subtract 'free files' from 'total files' to get the number of files on the FS (more or less). --n -- <huey> dd of=/dev/fd0 if=/dev/flippy bs=1024 <huey> ^^^ Making Flippy Floppy _______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine