JosephMCasey JosephMCasey - 18 days ago 7
Linux Question

Why does tar allow unhyphenated options?

When reading through

man tar
, you will see that nowhere is the tar command used without a hyphen. Why then does tar allow the following two commands to be valid:

tar c .
tar -c .

Answer

3.3 The Three Option Styles

There are three styles for writing operations and options to the command line invoking tar. The different styles were developed at different times during the history of tar. These styles will be presented below, from the most recent to the oldest.

https://www.gnu.org/software/tar/manual/html_section/tar_21.html