Tuesday, August 21, 2007

Re: [BLUG] screen

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

On 8/21/07, Steven Black <blacks@indiana.edu> wrote:
On Tue, Aug 21, 2007 at 02:20:29PM -0400, Weldon Sams wrote:
>    That sounds good -- screen and vi. Since you said vi, I think it could be
>    useful if we shared some of our favorite options and ways to use basic
>    unix commands (maybe even create a BLUG Cheat Sheet). Maybe just on the
>    list. I know I found out something useful on just good old "ls" this week
>    that drove me crazy for about 3 years. I always set the alias ls="ls -d"
>    because I hate a colored terminal and I want to see directories with the

You hate colored terminals? As in you hate the colored LS output like I do?
I just unset LS_COLORS, (or prevent it from being set), and make sure I don't
use aliases that include any color options.

>    trailing /. I didn't realize though that this henders ls'ing into symbolic

I'm a big fan of -f myself. It adds / to directories, * to executibles,
etc.

Using -d in an alias changes the effect of "ls somedir". Instead of
listing the contents of the directory you get the directory entry
itself.

In fact, I don't understand the benefits of aliasing ls to 'ls -dH'. As
an example:

blacks@somehost:~$ /bin/ls -dH
.

I used /bin/ls so as to avoid my alias. I don't get a directory listing
at all, and I don't get the / on directories, as you were saying you
were getting.

Cheers,
Steven Black

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug



--
Weldon Sams
wsams@indiana.edu

No comments: