Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jul 2002 15:00:00 -0700
From:      Darren Pilgrim <dmp@pantherdragon.org>
To:        Dru <dlavigne6@cogeco.ca>
Cc:        Mack Lobell <macklobell@hotmail.com>, freebsd-newbies@FreeBSD.ORG
Subject:   Re: Why does /bin/ls show dot-files when logged in as root?
Message-ID:  <3D3DD1E0.3B9D34F9@pantherdragon.org>
References:  <20020723172703.M158-100000@x1-6-00-80-c8-3a-b8-46.kico2.on.cogeco.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
Dru wrote:
> 
> On Tue, 23 Jul 2002, Mack Lobell wrote:
> 
> > Hi,
> >
> > i have a stupid ls question. When i hit /bin/ls as root i get a list
> > including dot-files. If i hit /bin/ls as a normal user i don't get any
> > dot-files, how come?
> >
> > Is this configurable?
> 
> Take a peek at /root/.cshrc

Not quite.  For example, my root account uses bash and there is no
ls alias.  However a straight "ls" will show dotfiles except for '.'
and '..'.  The reason for this is in ls(1):

     -A      List all entries except for . and ...  Always set for the super-
             user.

So basically there's a bit of code in ls that adds -A to the effective
commandline arguements when uid==0.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-newbies" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D3DD1E0.3B9D34F9>