News for hackers. Stuff that matters.
Re:Um – Create your own man pages so you can remember how to... by cyphar on Monday August 20, 2018 @02:07AM (#17798020)
> Why is it made to be like that?

The history of tar is quite long, but the short version is that it was first released as part of 7th edition Unix. It was a successor to tp[1] which was introduced in 4th edition Unix, which was a successor to tap[2] which was released in 1st edition Unix. In 1st edition Unix (as far as I could tell from looking through the man pages), no command had '-abc'-style flag support at all (so tap's semantics made sense). I imagine that quite a few users did something like 'alias tap=tp' and 'alias tp=tar' when upgrading, and so CLI backwards compatibility was required. As a result, everyone learned to use tar that way and it stuck.

[1]: http://man.cat-v.org/unix-6th/1/tp [2]: http://man.cat-v.org/unix-1st/1/tap

Re:Um – Create your own man pages so you can remember how to... by oblio on Monday August 20, 2018 @10:12AM (#17800007)
And the (funny?) thing is that now the whole world has to suffer, probably millions of developers, because at one point tar had an installed user base of about 500 people. Yay for backwards compatibility :)

Make is another famous victim of this:

> Why the tab in column 1? Yacc was new, Lex was brand new. I hadn't tried either, so I figured this would be a good excuse to learn. After getting myself snarled up with my first stab at Lex, I just did something simple with the pattern newline-tab. It worked, it stayed. And then a few weeks later I had a user population of about a dozen, most of them friends, and I didn't want to screw up my embedded base. The rest, sadly, is history.

Re:Um – Create your own man pages so you can remember how to... by teddyh on Monday August 20, 2018 @03:22PM (#17803001)
> now the whole world has to suffer

Bad example, since tar still works with a dash:

  tar -ztvf foo.tar.gz
> Make is another famous victim of this:

Now that is a much better example.

Re:Um – Create your own man pages so you can remember how to... by lifthrasiir on Monday August 20, 2018 @04:35AM (#17798461)
The same history applies to ps [1] which was introduced in 3rd Edition Unix.

[1] http://man.cat-v.org/unix-6th/1/ps

Re:Um – Create your own man pages so you can remember how to... by cyphar on Monday August 20, 2018 @05:29AM (#17798643)
Though from what I've seen, most people I talk to use the POSIX forms (such as 'ps -ef') and aren't aware that there is a BSD form (such as 'ps aux'). I've always used the BSD form, even though I came to Linux much much later, but I guess which form you use comes from where you learned basic *nix commands.

I guess the lack of '-' with tar is more apparent because POSIX didn't create a different syntax, and so most people omit the '-' for terseness -- while with ps it would require learning a different syntax.

Re:Um – Create your own man pages so you can remember how to... by lifthrasiir on Monday August 20, 2018 @06:24AM (#17798830)
> I've always used the BSD form, even though I came to Linux much much later, but I guess which form you use comes from where you learned basic *nix commands.

I too use the BSD form but came from the Linux world. Probably it is just a matter of taste (a common answer to everything!).

> I guess the lack of '-' with tar is more apparent because POSIX didn't create a different syntax, and so most people omit the '-' for terseness -- while with ps it would require learning a different syntax.

I argue the ps situation is worse than tar exactly because of that reason. There are three different classes of options in ps, often with slightly different meanings and sometimes with two different long-form options only distinguished by their cases...

Re:Um – Create your own man pages so you can remember how to... by junke on Monday August 20, 2018 @03:26AM (#17798254)
And all of this because originally, the Imperial Roman had no punctuation.
Re:Um – Create your own man pages so you can remember how to... by mehrdadn on Monday August 20, 2018 @03:10AM (#17798203)
Wow, thanks!