2010年7月5日 星期一

Linux Command - watch

Periodically run a command

# each 1 second run the program
while [ 1 ]; do echo "top"; /usr/local/bin/program; sleep 1; done

# each 100 microsecond run the program
while [ 1 ]; do echo "top"; /usr/local/bin/program; usleep 100; done

watch -d -n 1 'program1;program2'

沒有留言: