Automatically repeating a command in Linux
October 19th, 2009
Sometimes it’s nice to watch a folder or service without repetitively running the command and hitting enter over and over. Use the command Watch to automate this task. Below is an example to watch ps aux while grepping for “ssh”
watch -n 1 “ps aux | grep ssh”