Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
2011-09-15 09:59
579 查看
以前一直在AIX系统下玩,今天无意在linux下运行一个命令,出现如下错误:
[root@erpdemo ~]# ps -aux
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
……
奇怪?这个命令在AIX下运行一点也没有问题,提示语法错误? 看来命令书写有错误,ksh和bash的区别吗?然后换一种方式
[root@erpdemo ~]# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 10344 684 ? Ss 2010 1:33 init [3]
root 2 0.0 0.0 0 0 ? S< 2010 0:01 [migration/0]
我们继续去分析问题,man ps
EXAMPLES
To see every process on the system using standard syntax:
ps -e
ps -ef
ps -eF
ps -ely
To see every process on the system using BSD syntax:
ps ax
ps axu
a Lift the BSD-style "only yourself" restriction, which is imposed upon the set of all processes when some BSD-style (without "-")
options are used or when the ps personality setting is BSD-like. The set of processes selected in this manner is in addition to
the set of processes selected by other means. An alternate description is that this option causes ps to list all processes with a
terminal (tty), or to list all processes when used together with the x option.
<EOF>
[root@erpdemo ~]# ps -aux
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
……
奇怪?这个命令在AIX下运行一点也没有问题,提示语法错误? 看来命令书写有错误,ksh和bash的区别吗?然后换一种方式
[root@erpdemo ~]# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 10344 684 ? Ss 2010 1:33 init [3]
root 2 0.0 0.0 0 0 ? S< 2010 0:01 [migration/0]
我们继续去分析问题,man ps
EXAMPLES
To see every process on the system using standard syntax:
ps -e
ps -ef
ps -eF
ps -ely
To see every process on the system using BSD syntax:
ps ax
ps axu
a Lift the BSD-style "only yourself" restriction, which is imposed upon the set of all processes when some BSD-style (without "-")
options are used or when the ps personality setting is BSD-like. The set of processes selected in this manner is in addition to
the set of processes selected by other means. An alternate description is that this option causes ps to list all processes with a
terminal (tty), or to list all processes when used together with the x option.
<EOF>
相关文章推荐
- linux命令--Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
- Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
- Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
- Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
- /usr/share/doc/initscript-*/sysconfig.txt
- 'url' requires a non-empty first argument. The syntax changed in Django 1.5, see the docs
- Error: Could not link: /usr/local/share/doc/homebrew
- $ cat /usr/share/doc/wireshark-common/README.Debian
- Error: Could not link: /usr/local/share/doc/homebrew
- warning: templates not found /usr/local/git/share/git-core/templates
- 解决编译php时libtool: link: warning: library `/usr/share/mysql/lib/libmysqlclient.la' was moved.
- Linux学习之路--man/info/(/usr/share/doc/目录)
- [/usr/share/doc/pcre-8.32/Makefile] Error 127解决办法
- warning: templates not found /usr/local/git/share/git-core/templates
- warning: templates not found /usr/local/git/share/git-core/templates
- warning: templates not found /usr/local/git/share/git-core/templates
- iOS一个'initWithRequest:delegate:' is deprecated: first deprecated in iOS 9.0 - Use NSURLSession (see NSURLSession.h) Warning引发的思考
- bash: /usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF interpreter:No such file or directory
- WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead
- /usr/share/nginx/sbin/nginx