Counting files created in /tmp
Joy-lim Shaw
shaw at hpihoah.HP.COM
Fri Feb 2 14:45:43 AEST 1990
/ hpihoah:comp.unix.questions / jik at athena.mit.edu (Jonathan I. Kamens) / 10:33 am Jan 31, 1990 /
> I guess that you might consider what the original poster is trying to
>do as a "traffic map" of /tmp -- what files get put there most often,
>from what programs, and how many are there? There are no simple
>solutions to a question like this, and without modifying the kernel in
>some way, there is almost certainly no way to get a 100% accurate set of data.
I agree. There may even be "temporary" files that a process creates and
immediately unlinks. This allows the process to access a file that will
disappear after the process terminates.
The question here is: WHAT DOES THE ORIGINAL POSTER REALLY WANT? If
the original poster could be more specific, a kludge maybe available.
Send e-mail to me at shaw%hpda at hplabs.hp.com as I don't read notes on a
regular bases.
Also... (I'm nit picking here so please ignore)
1) you can leave out the -l option of ls() in "ls -la | wc -l",
since you're just counting the output (ls() will use unformated
output when it's not talking to a terminal (You knew that)).
2) You'll also be counting two extra outputs (. and ..) with the
-a option. Root by default will list invisible dot files out,
but a regular user will have to use ls -A.
shaw
More information about the Comp.unix.questions
mailing list