I installed Cygwin on my Windows XP to use some of its commands. Now I what to check a file every 2 minutes and want to use watch for this purpose but I see that Cygwin has no such command. Is this really true? what can I do instead?
watch in cygwin. But it isn't installed by default. You need to install
procps-ng package to appear
watch. (you can run cygwin installer again and it allows to install only the missed packages without reinstalling the whole cygwin)
watch you can use simple cycle like:
while true ; do check file ; sleep 2 ; done
check is your command of choice.
watch is in procps-ng, so install 'procps-ng' package.
Installed the ncurses package and then I get a
clear screen on every run. Thank you rush.
I ran mine as
while true ; do clear; <command> <file> ; sleep 2 ; done
while true ; do clear; grep ERROR server.log | tail -n 5 ; done
I wrote a command that emulates watch. I released it with source and compiled .exe file. You can find it here: http://www.garrettgalloway.com/index.php?p=projects&e=7