ps -aux的错误用法
2012-11-21 10:37
405 查看
很多人一直在使用ps -aux,其实这种用法是错误的,应该使用ps aux和ps -fe。man ps的第一页有一段话:
Note that "ps -aux" is distinct from "ps aux". The POSIX and UNIX standards require that "ps -aux" print all processes owned by a user named "x", as well as printing all processes that would be selected by the -a option. If the user named "x" does not exist,
this ps may interpret the command as "ps aux" instead and print a warning. This behavior is intended to aid in transitioning old scripts and habits. It is fragile, subject to change, and thus should not be relied upon.
翻译如下
请注意"ps -aux"不同于"ps aux"。POSIX和UNIX的标准要求"ps -aux"打印用户名为"x"的用户的所有进程,以及打印所有将由-a选项选择的过程。如果用户名为"x"不存在,ps的将会解释为"ps aux",而且会打印一个警告。这种行为是为了帮助转换旧脚本和习惯。它是脆弱的,即将更改,因此不应依赖。
如果你运行ps -aux >/dev/null,那么你就会得到下面这行警告信息
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
如果你在cygwin上运行ps -aux,那么你会得到下面的警告信息
ps: user x unknown
转自:http://walkerxk.i.sohu.com/blog/view/150633165.htm
Note that "ps -aux" is distinct from "ps aux". The POSIX and UNIX standards require that "ps -aux" print all processes owned by a user named "x", as well as printing all processes that would be selected by the -a option. If the user named "x" does not exist,
this ps may interpret the command as "ps aux" instead and print a warning. This behavior is intended to aid in transitioning old scripts and habits. It is fragile, subject to change, and thus should not be relied upon.
翻译如下
请注意"ps -aux"不同于"ps aux"。POSIX和UNIX的标准要求"ps -aux"打印用户名为"x"的用户的所有进程,以及打印所有将由-a选项选择的过程。如果用户名为"x"不存在,ps的将会解释为"ps aux",而且会打印一个警告。这种行为是为了帮助转换旧脚本和习惯。它是脆弱的,即将更改,因此不应依赖。
如果你运行ps -aux >/dev/null,那么你就会得到下面这行警告信息
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
如果你在cygwin上运行ps -aux,那么你会得到下面的警告信息
ps: user x unknown
转自:http://walkerxk.i.sohu.com/blog/view/150633165.htm
相关文章推荐
- 关于 ps -aux 的错误用法
- 错误的ps -aux
- Linux中ps -ef , ps -aux命令的用法
- POJ 3265 模拟 贪心 的错误用法
- 避免常见的6种HTML5错误用法
- OleDb与Access数据访问中日期时间参数类型错误和命名参数的用法
- C# yield在WCF中的错误用法(一)
- ps aux、ps -aux、ps -ef之间的区别
- linx ps aux显示的信息
- ps -aux|grep 详细信息
- direct=true 错误处理方法 (关于 Oracle 的数据导入导出及 Sql Loader (sqlldr) 的用法
- LinkedList的一种错误用法
- PHP error_log()将错误信息写入一个文件(定义和用法)
- PHP中error_reporting()函数的用法(修改PHP屏蔽错误)
- LinkedList 的一个错误用法
- Regsvr32 用法和错误消息的说明
- ps部分用法记录
- Regsvr32 用法和错误消息的说明
- Regsvr32 用法和错误消息的说明
- WebViewClient shouldOverrideUrlLoading 常见错误用法