In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "the usage of Linux basic command watch". In daily operation, I believe many people have doubts about the usage of Linux basic command watch. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "the usage of Linux basic command watch"! Next, please follow the editor to study!
Watch
The watch instruction can execute the program intermittently, displaying the output in full-screen mode, which is executed once every 2 seconds by default. Watch will run until it is interrupted.
The scope of this command: RedHat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora.
2. Grammar
Watch [- dhvt] [- n] [--differences [= cumulative]] [--help] [--interval=] [--no-title] [--version]
2. List of options
Option
Description
-d |-- differences
Highlight the difference
-- cumulative
Highlight "sticky"
-n
Specify time interval
-t |-- no-title
Date, time and interval seconds are not displayed
-h |-- help
Help information
-v |-- version
Display version information
3. Example code
Check email
Watch-n 60 from
View changes in the contents of the directory
Watch-d ls-l
If you are only interested in files owned by user Joe, you can use the
Watch-d'ls-l | fgrep joe'
To see the effect of quotation marks, give it a try
Watch echo $$
Watch echo'$$'
Watch echo "" $$"
You can monitor the administrator to install the latest kernel.
Watch uname-r
4. Examples
Execute the ls instruction every 3 s
[root@localhost ~] # watch-n 3 ls / / execute ls every 3 seconds
Every 3.0s: ls Sun Sep 23 09:04:40 2018
one
1.c ~
Anaconda-ks.cfg
Icmp_echo_ignore_all~
Icmp_echo_ignore_alv~
Icmp_echo_ignore_alw~
Icmp_echo_ignore_alx~
Icmp_echo_ignore_aly~
Icmp_echo_ignore_alz~
Install.log
Install.log.syslog
Nohup.out
Public
Template
Video
Picture
Document
download
Music
Desktop
At this point, the study of "the usage of the Linux basic command watch" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.