Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'View valid 'top' output on the desktop via GeekTool' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
View valid 'top' output on the desktop via GeekTool
Authored by: hysterion on Aug 09, '06 08:14:20PM
> "You're not actually shrinking the log file."

Well, I may be wrong, but believe it or not I did check this :-) I suggest you check your theory on the given script and not on a different one. Here then is what you get if you watch the log's growth:


$ while true; do ls -l /var/tmp/top.log; sleep 15; done
-rw-r--r--   1 fz  wheel  20090 Aug  9 22:52 /var/tmp/top.log
-rw-r--r--   1 fz  wheel  40180 Aug  9 22:53 /var/tmp/top.log
-rw-r--r--   1 fz  wheel  56252 Aug  9 22:53 /var/tmp/top.log
-rw-r--r--   1 fz  wheel  0 Aug  9 22:53 /var/tmp/top.log
-rw-r--r--   1 fz  wheel  20090 Aug  9 22:53 /var/tmp/top.log
-rw-r--r--   1 fz  wheel  40181 Aug  9 22:54 /var/tmp/top.log
-rw-r--r--   1 fz  wheel  56253 Aug  9 22:54 /var/tmp/top.log
-rw-r--r--   1 fz  wheel  0 Aug  9 22:54 /var/tmp/top.log
-rw-r--r--   1 fz  wheel  20090 Aug  9 22:54 /var/tmp/top.log
^C
i.e. the size does shrink to zero once a minute. (You can also see this by opening the log in Console.app with a double click.) What you are describing is what would happen if I had used ">" in place of ">>" in the script's os.system line.

[ Reply to This | # ]