Technology Industry

Posted by on 30 July, 2024

This post was originally published on this site

video

How to use the watch command

In this Linux tip, we will try out the watch command. It’s a command that will run repeatedly, overwriting its previous output until you stop it with a ^c (Ctrl + “c”) command. It can be used to sit and wait for some change in the output that you’re waiting to see.
By default, a command that is run through watch will run two seconds. You can change the time with the -t option. If you, for example, use the command “watch who”, the output will not change except for the date/time in the upper right corner – at least not until someone logs in or out of the system.
Every 2.0s: who fedora: Sat May 25 15:11:22 2024

fedora seat0 2024-05-25 14:24 (login screen)
fedora tty2 2024-05-25 14:24 (tty2)
shs pts/1 2024-05-25 14:25 (192.168.0.11)
Once another person logs in or someone logs out, a line will be added or removed from the list of logged in users.
Closing: Well, that’s your Linux tip for the watch command. It can be useful when you’re waiting for some change to happen on your Linux system.
If you have questions or would like to suggest a topic, please add a comment below. And don’t forget to subscribe to the InfoWorld channel on YouTube.
If you like this video, please hit the like and share buttons. For more Linux tips, be sure to follow us on Facebook, YouTube and NetworkWorld.com.

Jul 30, 2024 2 mins

Open Source

Posted Under: General

Social Media

Bulk Deals

Subscribe for exclusive Deals

Recent Post

Archives

Facebook

Twitter

Subscribe for exclusive Deals




Copyright 2015 - InnovatePC - All Rights Reserved

Site Design By Digital web avenue