Home > Linux Tutorials > Automatically repeating a command in Linux

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”

admin Linux Tutorials

  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.