What’s the difference between BSD-style and Unix-style command line options?

Posted on

What’s the difference between BSD-style and Unix-style command line options? – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, unix, command-line-interface, freebsd, .

I tried to google it but to no avail. Can anybody help me with this?

Solution :

It depends on the program. ps is the one that you encounter the most often – somebody who grew up in a BSD environment will type ps auwwx while somebody who grew up in a System V environment will type ps -ef even though ps these days supports both types of options now.

Much and little, see:

Also worry about:

Case sensitivity e.g.

mailx -R  replyTo@domain.com .....  # GNU/Linux
mailx -r  replyTo@domain.com .....  # Unix

Options required in some flavours but not others e.g.

/usr/bin/echo -e "Thisnis an test"  # GNU/Linux
/bin/echo        "Thisnis an test"  # Unix

Additional options e.g.

last -y  # BSD  - include year
last -a  # GNU/Linux - include hostname

One of the major differences across the platform is positional arguments. Most of the command line utilities will enforce that flags come before positional arguments. That is, on a GNU system, the following is fine:

ls / -la

On BSD, these are typically not valid. Obviously, this isn’t the extent of the differences between the two, but its one of the differences that drives me up the wall when I switch between them.

Leave a Reply

Your email address will not be published.