Re:Watch – A Useful Linux Command You May Have Never Heard Of
by jballanc on Wednesday October 27, 2010 @05:17AM
(#1837865)
You can do something similar on OS X using Kicker (http://github.com/alloy/kicker), which is based on the FSEvents library.
Re:Watch – A Useful Linux Command You May Have Never Heard Of
by JoeAltmaier on Tuesday October 26, 2010 @12:05PM
(#1834726)
Much better, because its doesn't keep spamming you even when nothing has changed so far.
Re:Watch – A Useful Linux Command You May Have Never Heard Of
by nitrogen on Tuesday October 26, 2010 @03:03PM
(#1835552)
I was thinking you could pipe watch into uniq, but then you wouldn't get any results until you killed it. The hexdump utility has adjacent duplicate line detection, and something similar would be trivial to create.
Re:Watch – A Useful Linux Command You May Have Never Heard Of
by konad on Wednesday October 27, 2010 @06:18AM
(#1837983)
Or just let the kernel tell you via inotify
http://en.wikipedia.org/wiki/Inotify
For this sort of thing I use a simple perl script called atchange. I could do:
And I'd see list output whenever a new file appeared in the directory. The hacky thing I usually use it for: to make things rebuild when I save my_source_file in my editor.The script is here: http://www.ccrnp.ncifcrf.gov/~toms/ftp/atchange The webpage about it is here: http://www-lmmb.ncifcrf.gov/~toms/atchange.html
I first learnt about it years ago while reading the entertaining ``Work'' Columns by Jeffreys Copeland & Haemer: http://alumnus.caltech.edu/~copeland/work/