ls mystery

Frank Shute frank at
Mon Feb 16 18:56:27 GMT 2004

On Mon, Feb 16, 2004 at 11:24:02AM +0000, Pete French wrote:
> > Now tell me that this isn't wrong... :)
> [oddness snipped]
> Now that certaiinly looks very wrong to me (what are the permissions
> on that directory?). I do not get that effect on any of the 4.9-RELEASE
> systems I have here though.

I think it's an alias/variable in my environment that's screwing it
up, namely:

alias ls='ls -G'


export CLICOLOR=true

To answer your question though:

drw-r--r--  2 root   wheel       512 Dec  3 01:53 xc

To replicate:

[pdksh@/home/frank]# mkdir somedir
[pdksh]# chown root:wheel somedir
[pdksh]# chmod 644 somedir       
[pdksh]# touch somedir/somefile 
[pdksh]# ls somedir

[pdksh]$ alias ls='ls -G'
[pdksh]$ export CLICOLOR=true

[pdksh]$ ls somedir
[pdksh]$ /bin/ls somedir
[pdksh]$ unset CLICOLOR
[pdksh]$ ls somedir

Without the alias or variable set it gives me a directory listing,
which is how I would expect it to behave even though some folks
reckoned you should have the executable bit set for listings (I

Perhaps somebody could test whether that alias/variable screws things
up with other shells. It seems to with /bin/sh also.  

Maybe you could see if you can replicate that behaviour on 4.9
RELEASE. If so, I'll file a pr, assuming one hasn't been filed



 Tel: 01423 323019
PGP keyID: 0xC0B341A3

More information about the Ukfreebsd mailing list