HarmonyOS 鸿蒙Next hdc 中如何使用ps -ef |grep "进程名"查找进程?
HarmonyOS 鸿蒙Next hdc 中如何使用ps -ef |grep "进程名"查找进程?
<markdown _ngcontent-wtx-c149="" class="markdownPreContainer">
hdc 如何过滤指定进程
问题背景:
调试过程中需要搜索子进程
执行操作:
`hdc shell ps -ef | grep mydemo`    
错误输出
grep : 无法将“grep”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确
,然后再试一次。
所在位置 行:1 字符: 20
+ hdc shell ps -ef | grep mydemo
+                    ~~~~
    + CategoryInfo          : ObjectNotFound: (grep:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
```
更多关于HarmonyOS 鸿蒙Next hdc 中如何使用ps -ef |grep "进程名"查找进程?的实战教程也可以访问 https://www.itying.com/category-93-b0.html
        
          5 回复
        
      
      
        学习了
更多关于HarmonyOS 鸿蒙Next hdc 中如何使用ps -ef |grep "进程名"查找进程?的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
反馈结果
hdc shell '命令'。需要加' ' 符号;例如 hdc shell 'ps -ef | grep demo'
grep是linux/macos上的命令
Windows上可以用findstr代替grep
Windows上可以用findstr代替grep
hdc shell 已经ssh到鸿蒙了
        
      
                  
                  
                  

