News for hackers. Stuff that matters.
Re:Watch – A Useful Linux Command You May Have Never Heard Of by Someone on Tuesday October 26, 2010 @07:42PM (#1836626)
What an awful name for such a tool. Unix commands have the command as subject, not the user (examples: ls, find, make, touch, shutdown). From the name and the 'ls' example, I expected something that reacted to file system notifications, but this doesn't watch, it repeats a command, clearing the screen before every iteration.
Re:Watch – A Useful Linux Command You May Have Never Heard Of by sofuture on Tuesday October 26, 2010 @08:30PM (#1836755)
You're watching the output of a command. In what world exactly, is the name 'watch' unclear or a poor choice?
Re:Watch – A Useful Linux Command You May Have Never Heard Of by thristian on Wednesday October 27, 2010 @02:48AM (#1837575)
I think the person you're responding to felt that Unix command should describe what you're telling the computer to do: "ls" makes the computer list files, "find" makes the computer find things, "echo" makes the computer echo what you give it, etc.

"watch" does not make the computer watch anything (at least in its default mode of operation); it makes the computer run a command repeatedly and the user watches it. "repeat" or "refresh" might have been more consistent names.

Re:Watch – A Useful Linux Command You May Have Never Heard Of by Someone on Wednesday October 27, 2010 @03:35AM (#1837685)
Yes, that is what I was complaining about. An alternative, consistent with 'at', could be 'every':

  *every 2s ls*

  *echo "ls" | every 5m
For readability, I would then drop the default for the time interval; the command without the time interval (every ls) reads awfully.

And yes, that first way of specifying what to repeat is different from the way at does it. I am not sure I would want to follow 'at' in that respect.