Watching the output from a Linux command

From Useful Data
Jump to navigation Jump to search

Watching the output from a Linux command

The watch command is the one required. Useful options are:

Options:
  -d, --differences[=<permanent>]
                         highlight changes between updates
  -g, --chgexit          exit when output from command changes
  -n, --interval <secs>  seconds to wait between updates

Usage is watch [options] command such as:

watch -d -n 5 dropbox status

which will tell you what DropBox is up to, every five seconds, and will highlight which bits of the output have changed. Useful when waiting for a loooooong synchronisation to occur.