summary: Re: /usr/bin/ls & ls giving different results

From: <>
Date: Fri Jun 29 2001 - 09:25:25 EDT
Hi all...

My original posting is shown at the end of this mail.

Many thnaks to all 41 of you who replied.  Too many to name.  everybody
without fail suggested that it was likely to be an alias issue.  ie., that
the user had set up an alias for 'ls' of 'ls -F'.  However this is not to be
the case.

I did do an 'su -' to the user in question to check this before posting.
Didnt see any aliases so made the posting.

However, upon further investigation, the issue seems to be a ksh function
which has been defined.  Basically, the .kshrc runs another script.  Pretty
early on in this script there is some code like the following (I have
chopped out the irrelevant stuff):

if [ -t 0 ]; then
        # its a terminal
        # list directories in columns, indicate type and follow links.
        ls () { /bin/ls -CFL ${@:-.} ; }
blah blah

Ho hum...  should have spotted this one myself.

many thanks to everyone.

regards - Tony

Quotation: "Is the glass half full or half empty?? ...
               Well, drink it anyhow, that's what I say".
  Pete Goss.

Quotation: "God gave men two ears but only one tongue.  Think
               about something and chew it to death before you
               spit it out as abuse, for the greatest remedy to
               anger is delay.".
  Charlie Burton.

| TONY MILLER -    Systems Projects - VODAFONE LTD, Derby  House, |
|                  Newbury Business Park, Newbury, Berkshire.     |
| Phone       | 01635-677687(local)                               |
| Work email  | ANTHONY.MILLER@VF.VODAFONE.CO.UK                  |
| FAX         | 01635-233517                                      |

Disclaimer: Opinions expressed in this mail are my own and do not
reflect the company view unless explicitly stated.  The information
is provided on an 'as is' basis and no responsibility is accepted for
any system damage howsoever caused.

> All...
> I'm sure that this is a silly question and that I'm missing something
> obvious here but...
> I have an E10k domain running Solaris 8.
> The user in question has /usr/bin/ksh as the shell within the passwd file.
> The user : when I do an 'ls' I see directory names displayed with the
> trailing slash (eg., xxx/).
> If the user in question does a 'truss ls' it seems to me to indicate all
> ok and that /usr/bin/ls is being run.  I see the following line as the
> output line:
> execve("/usr/bin/ls", 0xFFBEF1EC, 0xFFBEF1F4)  argc = 1
> However, as the same user, if I do a '/usr/bin/ls' I see directory names
> listed without the trailing slash.
> The root user has /bin/ksh as its shell.  /bin is a link to /usr/bin so
> shells of the two users are the same.  
> When the root user does an 'ls' I do NOT see directory names supplied with
> the trailing slash.  I get exactly the same (expected) output with root if
> do a '/usr/bin/ls'.  Doing a 'truss ls' as root indicates /usr/bin/ls is
> being run.
> I don't understand the difference behaviour.  root behaves as I would
> and I would have expected that the other user should behave the same,
> all evidence seems to point to this.
> What am I doing wrong?
> Thanking you in advance.
> best regards - Tony
Received on Fri Jun 29 14:25:25 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:24:58 EDT