作者:佚名 时间:2024-06-03 12:24:24 阅读:(14)
在服务器上执行ps命令的时候提示Warning: bad syntax, perhaps a bogus '-'?,看到这个提示很多小伙伴不知道如何解决,接下来云梦编程为大家介绍一下Warning: bad syntax, perhaps a bogus '-'?的解决方法,有需要的小伙伴可以参考一下:
[root@kjserver ~]# ps -aux | grep svn Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
查看提示里面的文档,发现给出了一些原因。
Why does "ps -aux" complain about a bogus '-'? According to the POSIX and UNIX standards, the above command asks to display all processes with a TTY (generally the commands users are running) plus all processes owned by a user named "x". If that user doesn't exist, then ps will assume you really meant "ps aux". The warning is given to gently break you of a habit that will cause you trouble if a user named "x" were created.
(1)、官方给的解决方法:
No ps release has ever had this problem. Most likely your system has been broken into. You might want to install a more recent version of the OS. If you'd rather take your chances, simply upgrade procps.
(2)、亲测可用:
把命令中的“-”去掉再去执行命令即可
ps aux | grep svn
以上就是云梦编程为大家带来的Warning: bad syntax, perhaps a bogus '-'?的解决方法的全部内容了,希望对大家有所帮助,按照上面方式就可以解决,了解更多相关文章请关注云梦编程网!