“ps aux” works but “ps -aux” doesn't

前端 未结 2 558
悲&欢浪女
悲&欢浪女 2021-02-07 12:14

This might seem like a silly question but I haven\'t been able to find a clear answer.

This website states that the dash is optional in

ps aux
         


        
2条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-07 12:31

    Back in the day (from the late 1970s), there were basically two varieties of UNIX, the AT&T version from Bell Labs and the BSD version from UC Berkeley. The options to ps were different in the two versions. OS X now mostly conforms to the modern UNIX standard which follows the AT&T options to ps. But since the BSD ps didn't require a leading '-' option and so many people were used to typing 'ps aux', Apple has decided to leave that sequence with its original BSD interpretation.

提交回复
热议问题