LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-11-2012, 01:35 AM   #1
splinux
Member
 
Registered: Jun 2011
Location: Sri Lanka
Distribution: centos,redhat,ubuntu
Posts: 90

Rep: Reputation: Disabled
Explain the ls -l output anyone


dir1

output
drwxrwx--- 2 root root 4096 March 11 12.49 dir1


D for directory
rwx permission

What is this 2 ? sybolic link or hardlink ?
 
Old 03-11-2012, 03:15 AM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
You can read about it with the info pages of ls. The man page directs you to run the command info coreutils 'ls invocation' for more information.

Running the command brings up section 10.1 of the coreutils documentation. Press the down arrow to scroll through the info and move to the next subsection. The info you want is in 10.1.2. The text from that section regarding the '-l' or 'long' directory listing:
Code:
`-l'
`--format=long'
`--format=verbose'
     In addition to the name of each file, print the file type, file
     mode bits, number of hard links, owner name, group name, size, and
     timestamp (*note Formatting file timestamps::), normally the
     modification time.  Print question marks for information that
     cannot be determined.
There is more information regarding the long listing format, and I'm sure it would address any followups you might have.
 
Old 03-11-2012, 04:23 AM   #3
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
With respect to Dark_Helmet
just a quick explanation of
Quote:
Originally Posted by splinux View Post
dir1

output
drwxrwx--- 2 root root 4096 March 11 12.49 dir1


D for directory
rwx permission

What is this 2 ? sybolic link or hardlink ?
That is the number of links pointing inside this directory (here , here and here)

Last edited by lithos; 03-11-2012 at 04:30 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Explain df output svenxix Linux - Newbie 9 01-20-2014 08:46 AM
Can any one please explain this output? ishandutta2007 Programming 4 06-23-2010 02:16 AM
please explain the output of the printf dina3e Linux - Newbie 14 10-15-2008 12:03 PM
explain the output suchi_s Programming 9 11-08-2004 10:07 AM
explain the output c pragti Programming 10 05-28-2004 01:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:11 AM.

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
Open Source Consulting | Domain Registration