Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!usc!snorkelwacker!bloom-beacon!eru!luth!sunic!tut!santra!santra!sja From: sja@sirius.hut.fi (Sakari Jalovaara) Newsgroups: comp.unix.questions Subject: Re: Counting files created in /tmp Message-ID: Date: 4 Feb 90 12:50:18 GMT References: <22031@unix.cis.pitt.edu> Sender: news@santra.uucp (Cnews - USENET news system) Organization: Helsinki University of Technology Lines: 14 In-Reply-To: ken@cs.rochester.edu's message of 3 Feb 90 18:49:31 GMT > how many files get created in the /tmp subdirectory of Unix on a Sun > 3/50 or 3/60 How about this: if you are running SunOS 4 you can get an estimate by modifying the dynamically linked C library. Write new versions of open(), creat() and unlink() that first check if the argument file is in /tmp, write to a trace log, and then do the real system call. Again, not simple but doable, at least if you have the source to libc. Depends on how serious you are about getting the statistics... Statically linked programs (sh, tar etc) escape the statistics. Files that are unlink()ed but left open are not tracked correctly. ++sja