Hey, watch this!

I had a teflon tape moment (to borrow a metaphor from MJD) recently in discovering the watch command.

You know how you run the same command repeatedly, trying to see if it changed? Like ls -la file.name to see when it’s done downloading, or ps ax | grep foo to see if a particular process has terminated, or whatever. Well, turns out that the watch command does exactly that:

watch -n 10 ls -la file.name

Now, you were already aware of that, and have been using it for years, or it’s a completely new thing to you, and you’ll wonder why you never knew about it. Like teflon tape.

I now use this command several times a day, and can’t imagine how I put up with all that extra typing before. Right now, I’m using it to watch my firewall ruleset change as the spam pours in. The spammers seem extra busy this week.