ps: bad aux
时间: 2023-08-21 08:04:40 浏览: 282
shell字符串截取报错:Bad substitution的解决
回答: 当在Linux上执行ps命令时,如果出现"ps: bad aux"的错误提示,这通常是由于使用了错误的选项导致的。在引用\[1\]中提到,"ps -aux"是一种不正确的写法,正确的写法应该是"ps aux"。这是因为POSIX和UNIX的标准要求"ps -aux"打印用户名为"x"的用户的所有进程,而如果用户名为"x"不存在,ps会解释为"ps aux"并打印一个警告。因此,为了避免出现"ps: bad aux"的错误提示,应该使用正确的选项"ps aux"来执行ps命令。引用\[2\]中提供了解决"Warning: bad syntax, perhaps a bogus '-'?"的方法,可以参考一下。
#### 引用[.reference_title]
- *1* [linux之ps aux、ps -aux、ps -ef命令的区别](https://blog.csdn.net/corleone_4ever/article/details/105222285)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [Linux命令Warning:bad syntax, perhaps a bogus '-'?的解决方法-吾爱编程网](https://blog.csdn.net/weixin_30456153/article/details/116851858)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [ps aux指令詳解](https://blog.csdn.net/lumengabc/article/details/26496283)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文