“每天一命令之watch”与“每天一命令之wget”:页面之间的差异

来自linuxsa wiki
(页面间差异)
跳转到导航 跳转到搜索
Evan留言 | 贡献
无编辑摘要
 
Evan留言 | 贡献
无编辑摘要
 
第1行: 第1行:
=eg=


watch - execute a program periodically [ˌpɪriˈɑːdɪkli] , showing output fullscreen
  wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
  #不下载 ,
  -q,  --quiet                    安静模式 (无信息输出)


  watch kubectl get pods -n rook-ceph
==
-O  file  ,not number 0
      --output-document=file
          The documents will not be written to the appropriate files, but all will be concatenated together and written to file.
          If - is used as file, documents will be printed to standard output, disabling link conversion. (Use ./- to print to a
          file literally named -.)


          Use of -O is not intended to mean simply "use the name file instead of the one in the URL;" rather, it is analogous to
          shell redirection: wget -O file http://foo is intended to work like wget -O - http://foo > file; file will be truncated
          immediately, and all downloaded content will be written there.


[https://blog.csdn.net/weixin_42499444/article/details/112635140 每隔10秒执行一次_Linux重复执行命令之watch命令10个案例]


=R=
[https://linuxtoy.org/archives/wget-tips.html wget 使用技巧]


每隔1秒查看http连接数,怀疑受到CC攻击时非常实用
[[category:ops]]
 
[root@zcwyou ~]# watch -n 1 -d 'pstree|grep http'
 
=references=
[https://www.cnblogs.com/peida/archive/2012/12/31/2840241.html 每天一个linux命令(48):watch命令]
 
 
[[category:devops]] [[category:shell]]

2025年2月12日 (三) 04:34的最新版本

eg

  wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
  #不下载 ,
  -q,  --quiet                     安静模式 (无信息输出)

== -O file ,not number 0

      --output-document=file
          The documents will not be written to the appropriate files, but all will be concatenated together and written to file.
          If - is used as file, documents will be printed to standard output, disabling link conversion.  (Use ./- to print to a
          file literally named -.)
          Use of -O is not intended to mean simply "use the name file instead of the one in the URL;" rather, it is analogous to
          shell redirection: wget -O file http://foo is intended to work like wget -O - http://foo > file; file will be truncated
          immediately, and all downloaded content will be written there.


R

wget 使用技巧