"ps aux"有效,但"ps -aux"没有

Ste*_*eve 14 unix macos terminal command

这似乎是一个愚蠢的问题,但我无法找到一个明确的答案.

该网站声明破折号是可选的

ps aux
Run Code Online (Sandbox Code Playgroud)

但是,ps aux工作但ps -aux会带来错误no user named 'x'.任何想法可能是这里的问题?运行Mac 10.8.2.谢谢

zzk*_*zzk 12

man ps
Run Code Online (Sandbox Code Playgroud)

会给你这个:

 The biggest change is in the interpretation of the -u option, which now
 displays processes belonging to the specified username(s).  Thus, "ps
 -aux" will fail (unless you want to know about user "x").  As a conve-
 nience, however, "ps aux" still works as it did in Tiger.
Run Code Online (Sandbox Code Playgroud)


rha*_*oto 8

回到当天(从20世纪70年代末开始),基本上有两种UNIX,贝尔实验室的AT&T版本和加州大学伯克利分校的BSD版本.ps的选项在两个版本中有所不同.OS X现在大多符合现代UNIX标准,该标准遵循AT的AT&T选项.但由于BSD ps并不需要一个领先的' - '选项,并且很多人习惯于输入'ps aux',Apple已决定将该序列保留为原始的BSD解释.