LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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-06-2009, 10:48 AM   #1
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: FreeBSD 9.1
Posts: 154

Rep: Reputation: 25
ls -ln


Hi Guys,

I am trying to understand the meaning of the output of ls -ln.
I did look on the internet and as well on man ls without any success. I am posting the output and I would appreciate if someone more knowledgeable than me could explain the numbers. If you guys have a web site I can go to for explanations, that would be great as well.

drwxr-xr-x 4 1000 1000 4096 2009-03-06 11:23 Desktop

Cheers
 
Old 03-06-2009, 11:10 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by riganta View Post
Hi Guys,

I am trying to understand the meaning of the output of ls -ln.
I did look on the internet and as well on man ls without any success. I am posting the output and I would appreciate if someone more knowledgeable than me could explain the numbers. If you guys have a web site I can go to for explanations, that would be great as well.

drwxr-xr-x 4 1000 1000 4096 2009-03-06 11:23 Desktop

Cheers
The first bit are the permissions (rwx-=read,write,execute,none). I'm not sure about the second number. The third and forth refer to the owner and the group rights to use the file. The file size comes next. After that is date of creation or last modification whichever is more recent. The time of that last modification and finally the name of the file/folder.
That should get you started.
cheers,
jdk
 
Old 03-06-2009, 11:21 AM   #3
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
All the n option does is replace the user and group names with the numeric values represented by those names.

Compare the ls -ln output to the ls -l output to see the difference. (On many distributions, users are numbered starting from 1000, and any users in the 1 through 999 range are assumed to be "system" users. User 0 is always "root.") By default, the "primary" group for a user is a private group with the same number and name as the user.

The 4 is the number of hard links to that directory and the 4096 is the number of bytes used by the directory. (Actually, 4096 is probably the minimum block size used by your file system, so you'll only see 0, 4096, 8192, ..., as directory sizes.)

I will assume you understand the date and time numbers . . .
 
Old 03-06-2009, 12:38 PM   #4
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: FreeBSD 9.1
Posts: 154

Original Poster
Rep: Reputation: 25
Thank you so much Guys.
 
Old 03-06-2009, 05:22 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,990

Rep: Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448
here is a listing
http://www.oreillynet.com/linux/cmd/
http://www.oreillynet.com/linux/cmd/cmd.csp?path=l/ls
or have you read
Code:
man ls
 
  


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




All times are GMT -5. The time now is 12:52 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration