LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-27-2007, 06:44 AM   #1
runnerpaul
Member
 
Registered: Mar 2006
Location: Ireland
Distribution: Fedora 5
Posts: 66

Rep: Reputation: 15
dir and ll commands


What is the difference between the dir and ll commands?
 
Old 03-27-2007, 06:48 AM   #2
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Those aren't standard commands, I expect that they are aliased to some variant of ls. To find out, type
Code:
which dir
which ll
to find out if I'm right!

edit: oops, it seems dir is a command in its own right! damn my impatience!... OK, I'm as stumped as you now...
edit 2: I'm still pretty certain that ll will be aliased to ls though.

Last edited by pwc101; 03-27-2007 at 06:55 AM.
 
Old 03-27-2007, 07:42 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Hi,

As far as I know both dir and ll are aliases and not 'real' commands (external or internal).

Try alias from the command line and see which aliases appear and what they do, the ll and dir should be among them.

Hope this helps.
 
Old 03-27-2007, 08:19 AM   #4
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
The only reason I second guessed myself was that here at work we have some RHEL boxes, and they do have a /usr/bin/dir binary (not a symlink). It even has a manpage!

edit: ah! some progress. Apparently, according to info dir, dir is part of the coreutils (on this RHEL box anyway). And I quote:
Quote:
File: coreutils.info, Node: dir invocation, Next: vdir invocation, Prev: ls \
invocation, Up: Directory listing

`dir': Briefly list directory contents
======================================

`dir' (also installed as `d') is equivalent to `ls -C -b'; that is,
by default files are listed in columns, sorted vertically, and special
characters are represented by backslash escape sequences.

*Note `ls': ls invocation.

Last edited by pwc101; 03-27-2007 at 08:22 AM.
 
Old 03-28-2007, 02:55 AM   #5
DJNolz83
Member
 
Registered: Aug 2006
Distribution: Ubuntu
Posts: 91

Rep: Reputation: 15
In my experience, using "dir" produces the same output as "ls -l"
 
Old 03-30-2007, 03:29 AM   #6
runnerpaul
Member
 
Registered: Mar 2006
Location: Ireland
Distribution: Fedora 5
Posts: 66

Original Poster
Rep: Reputation: 15
Cheers. Thats what I fount. Thats why I asked.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compress dir keep file/dir permissions powadha Linux - General 1 11-14-2006 08:07 PM
Q. moving /bin dir files to /dev dir?? Texas_student Linux - Software 2 03-27-2006 12:42 AM
Share configuratin dir (.dir) for 3 accounts on local computer LiNuXkOlOnIe Linux - Software 5 01-08-2006 04:36 AM
howto make a dir shared that is not in my home dir Schmurff Linux - Newbie 2 06-19-2004 08:54 PM
problem using ls and dir commands in wu-ftp server amit666 Linux - Newbie 2 02-03-2004 09:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration