Wednesday, August 22, 2007

[BLUG] Re: Smart/dumb aliases (Was: screen)

IMHO, always read the man page for the command you use
no matter how trivial the command you use. I have used
'ls' for 25 years and am always surprised that there is
yet another new switch that I have never heard of when
I switched to different systems (from Bell Lab Unix,
Digital Unix/Ultrix, SUNOS, Solaris, IRIX, AIX, to
whatever flavor you can name.) Now it seems to be
simpler on Linux since essentially all vendors use GNU
version. Still, they put the 'smart' aliases into
system-wise startup scripts which might not appeal to
everybody's tastes. Personally I always have to either
'unalias rm' or just '\rm ...' to get by the alias many
vendors put in. One drawback is that if that happens to
be your first experience of Unix/Linux, you think 'rm -r *'
should always ask for your confirmation until you do the
samething on a different system, such as IRIX. ;-)

--Shing-Shong

Weldon Sams wrote:
> Sorry if this sounds choppy, I was having other conversations while
> writing this. Multi-Tasking at its finest. :)
>
> Yep, I hate the colored ls output. I am using the -f option now
> instead of -d. What system are you using where -dH doesn't work? This
> doesn't work on my linux machines. I've only verified it on Mac.
>
> I hope I didn't sound like I was saying 'ls -dH' is the end all of ls
> commands. I just meant, I always used 'ls -d' to avoid colored output,
> and then ran into the ls'ing symbolic links that didn't list the
> contents, but I didn't realize for 3 years the -d caused the problem.
> Basically, I accidentally ran into using -H to solve the problem, but
> didn't realize I could substitute -f for -dH. There are several other
> commands other than -d that require the -H command on Mac if you want
> to list directory contents while using -d ... etc. Between mac, linux
> and unix, they have different options for the same letter.
>
> ls -dH gives me ./ on Gentoo, but lists on Mac. I want to say that I
> didn't use -d on solaris and it still listed directories/symlinks as
> just the directory and not the contents.
>
> Weldon
>
> <mailto:wsams@indiana.edu>
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

No comments: