GNU/Linux Command – WATCH

watch – Periodically run and show the output of a Program


Watch runs the specified command(s) repeatedly, displaying its output. This allows us to monitor the output changes over time. Press Ctrl+C to stop the Watch Command.

Examples :-
$ watch ls -- For every 2sec(default), run the 'ls' and show theoutput on the screen. $ watch -n 6 who -- For every 6Sec, run the 'who' and show thelist of current users. $ watch -d date -- Highlight the difference between the successiveupdates. $ watch /sbin/ifconfig eth0 -- Watch the traffic on eth0 interface. $ watch "/sbin/ifconfig eth0 | grep bytes" -- Watch RX/TX bytes. $ watch "/sbin/ifconfig; date" -- Watch multiple commands.
Read: man watch

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: