Linux Annoyances
My Unix experience has been primarily FreeBSD since about 1995. Lately, I have been forced to use Linux more actively. In particular, in early 2009 I moved my primary Internet services to a machine running CentOS. Since CentOS is essentially RedHat, most of these issues will apply to both.
It should be noted that most of my gripes with Linux have to do with "deprecation", the practice of destroying backward compatibility out of a self-evinced attitude of superiority. The bulk of the Linux development community, it seems, lacks the experience and perspective to know the difference between a solution and a preference, and frequently ends up throwing the baby out with the bathwater.
ps: '-' is deprecated
The arguments understood by ps under BSD are completely different from those understood by SysV. I get that, I have lived in both worlds, and neither one is wrong. However, the Linux people have attempted to pacify both the SysV and the BSD people by making both sets of arguments functional. The trouble is, they way they differentiate this functionality is by checking for the existance of a '-' before the options.
I guess they assume BSD people are lazy and never use the hyphen, since it is optional for them. Well, I'm not lazy. Consequently, I keep being told that my hyphen is "bogus":
paranoia.coreth.com:/home/mpearce 1763> ps -auxww Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
tail +
This one took me a while to figure out. The tail command outputs the tail end of a file. It defaults to the last ten lines, but it takes an argument to specify the number of lines. If that argument begins with a '+' character, then it counts from the top, rather than backward from the end.
This is well documented on Solaris. It also works on BSD, though the manpage only describes this behavior in a footnote, referring to it as "historic command line syntax". However, the BSD manpage says arguments to the -b, -c, and -n options can be specified with a leading '+' character. It does not work on Linux. The Linux manpage does not describe any way to duplicate the same functionality. However, the Linux info page does describe the leading '+' character for -c and -n, and it makes reference to the syntax available on "older" and "obsolete" systems, which can be turned on by setting an environment variable, "_POSIX2_VERSION".
Thank you for your valiant efforts to (pointlessly) modify my behavior. Now I have to go back and alter a bunch of scripts. And while we're on the subject, why is it necessary to have two parallel sets of documentation? Why is the "full documentation" maintained as a Texinfo page, rendering the manpage incomplete?
date -r
I just read a Slashdot article about Unix time approaching 1234567890. They posted a perl script to determine when that will be in your time zone:
perl -e 'print scalar localtime(1234567890),"\n";'
I looked at that and wondered, why don't they just use date -r? Well, because Linux's date command doesn't have a -r option. I guess I can't blame this on Linux, because Solaris doesn't have it either. However, this is such a common-sense feature, why isn't it universal?