【问题标题】:Use of watch and lsof + grep together [duplicate]一起使用 watch 和 lsof + grep [重复]
【发布时间】:2021-08-23 10:53:46
【问题描述】:

当我使用时

lsof -p 3536693 | grep snapshot

我得到一个输出

但如果我尝试

watch lsof -p 3536693 | grep snapshot

我什么也得不到。它们不兼容吗?

如果我省略 grep 就可以了,比如

watch lsof -p 3536693

【问题讨论】:

    标签: grep watch lsof


    【解决方案1】:

    它在引用“watched”命令时起作用,所以:

    watch "lsof -p 3536693 | grep snapshot"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-09-26
      • 1970-01-01
      • 1970-01-01
      • 2012-09-18
      • 1970-01-01
      • 2014-03-12
      • 2012-04-10
      • 1970-01-01
      相关资源
      最近更新 更多