Difference between dir and ls

  • Follow


Hi,
 By POSIX standard, is there any difference between dir and ls.

    greenhorn

0
Reply teachgreenhorn (40) 4/4/2005 6:17:32 PM

"Greenhorn" <teachgreenhorn@yahoo.com> wrote:
>Hi,
> By POSIX standard, is there any difference between dir and ls.
>
>    greenhorn

According to POSIX, /ls/ is a program to list directory
contents; and /dir/ doesn't exist.

-- 
Floyd L. Davidson           <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)                         floyd@barrow.com
0
Reply floyd 4/4/2005 7:00:01 PM


"Greenhorn" <teachgreenhorn@yahoo.com> writes:

> Hi,
>  By POSIX standard, is there any difference between dir and ls.
> 
>     greenhorn

Yes, one BIG difference. ls is a POSIX command. dir is nothing.

http://www.opengroup.org/onlinepubs/009695399/
(search for: dir)

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
The mighty hunter
Returns with gifts of plump birds,
Your foot just squashed one.
0
Reply Pascal 4/4/2005 7:00:40 PM

In article <1112638652.515894.207330@l41g2000cwc.googlegroups.com>,
 "Greenhorn" <teachgreenhorn@yahoo.com> wrote:

> Hi,
>  By POSIX standard, is there any difference between dir and ls.

There is no dir command in POSIX.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
0
Reply Barry 4/4/2005 7:15:36 PM

Greenhorn wrote:

>  By POSIX standard, is there any difference between dir and ls.

There's no official dir command in POSIX.  A lot of Linux distributions 
and the like make dir an alias for ls in their shell profiles.  You can 
verify this is probably what's happening by typing:

	which dir

-- 
Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
   Hate come gratis / I connected every kind
   -- Lamya
0
Reply Erik 4/4/2005 9:07:28 PM

4 Replies
937 Views

(page loaded in 0.212 seconds)

Similiar Articles:













7/23/2012 6:52:29 PM


Reply: