[X-Unix] 10.5 cli -what's up with 'more'? [b]

Stroller macmonster at myrealbox.com
Sat Dec 8 23:58:16 PST 2007


[...CONTINUED]

On 1 Dec 2007, at 18:25, David Ledger wrote:
> ...
> As for ease of use, I don't know what is easier about Linux. One of  
> the original command line objectives of Unix, never use two  
> keystrokes where one would do, is lost in Linux with its -- 
> givetheoptionalongnamesopeopleknowwhatitsdoes flags that you can't  
> remember.

The --givetheoptionalongnamesopeopleknowwhatitsdoes flags are no  
specified for exactly that reason.

Hardly anyone continues to use that format once they're familiar with  
a command - one will naturally use the "-v" form - but if you use a  
command infrequently then the long version may be more memorable (not  
less, as you assert).

These flags are most useful when demonstrating commands to other  
people - when you're writing an email to someone who's having  
problems with their system it's easier to say "use `ls --sort-by- 
colour --ignore-directories" rather than "use `ls -xyz`" and then  
have to spend time explaining what "-x", "-y" and "-z" do (and  
politer than just saying "use `ls -xyz`" and leaving the poor user  
baffled by these esoteric flags which make no sense at all to them.  
"Oh, read the manpage" is the cry thrown out at n00bs 10 years ago,  
but honestly one can waste HOURS learning Unix).

"--givetheoptionalongnamesopeopleknowwhatitsdoes" is also nice in  
scripts - assuming they're not intended to be cross-platform -  
because it helps document the script.

Whilst I kinda agree in principle with "never use two keystrokes  
where one would do" - or rather "never use one command when you can  
pipe two command together" - I find it much easier to look up the  
manpage of a command I already know to see if it's got an option to  
do what I need, rather than to find a command I've never used before  
in order to rearrange the output. This is most striking when there's  
a command you used once before and the name of it is on the tip of  
your tongue but you can't quite remember what it is. You know you  
used it in conjunction with `ls`, but since it's a separate command  
(rather than a useful additional flag) it's not mentioned in the `ls`  
manpage.

I have a great example here of how the traditional way of doing Unix  
commands is obscure & unhelpful, but I don't quite have time right  
now to explain my complaints about it, as I have to run out.

>> I'd be surprised if Dead Rat - or any other modern distro - is  
>> using any other version of `ls` than the GNU one. I think that -  
>> with a bit of hunting around - it should be possible to pin down  
>> how `ls` is being called and get it to behave the way you expect.
>
> I wouldn't know what the GNU one is like. My Linux exposure is  
> small, as it's mainly useful on the desktop. These machines are  
> some that are used at the enterprise level, and proving weekly that  
> it's not quite ready yet.

If you're using Linux at the enterprise level then doesn't that prove  
it's ready?   ;)

I think you'll find that RedHat - as most ALL Linux distros - uses  
the GNU version of `ls`:

   $ ls --version
   ls (GNU coreutils) 6.9
   Copyright (C) 2007 Free Software Foundation, Inc.
   This is free software.  You may redistribute copies of it under  
the terms of
   the GNU General Public License <http://www.gnu.org/licenses/ 
gpl.html>.
   There is NO WARRANTY, to the extent permitted by law.

   Written by Richard Stallman and David MacKenzie.
   $

I'm not saying you're wrong - it's up to you what you prefer - just  
that there are valid reasons for doing things differently, and that  
nothing goes unchanged or stays the same forever (unless you choose  
to install BSD on your servers).

Stroller.



More information about the X-Unix mailing list