LinuxQuestions.org
Review your favorite Linux distribution.
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 10-09-2011, 06:46 PM   #1
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,645

Rep: Reputation: 278Reputation: 278Reputation: 278
Post ls output interpretation


hi guys, need your help to understand the ls output command


drwxr-xr-x 2 root root 4096 oct 9 2011 xml

d - directory
rwxr - permission for the owner
xr - permission for the group
x - permission for others

2 = means what?

root = name of the user

4096 = means what? is this a process id or what?

thanks.
 
Old 10-09-2011, 06:58 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590
2 - links, 4096 - I/O block size. Also see 'stat xml' output.
 
1 members found this post helpful.
Old 10-09-2011, 07:39 PM   #3
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,769

Rep: Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052
I am pretty sure that if you use your exact words in google, ie ls output interpretation, at least one of the 4+million replies must have this information.
I would add that some of the information you provided is actually incorrect.
 
1 members found this post helpful.
Old 10-10-2011, 12:57 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913
Quote:
Originally Posted by JJJCR View Post
rwxr - permission for the owner
xr - permission for the group
x - permission for others
Not quite ...

The perms come in triples
Code:
d                  directory
 rwx               owner
    r-x            group
       r-x         other

Cheers,
Tink
 
1 members found this post helpful.
Old 10-10-2011, 03:17 AM   #5
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,645

Original Poster
Rep: Reputation: 278Reputation: 278Reputation: 278
Thumbs up

Quote:
Originally Posted by Tinkster View Post
Not quite ...

The perms come in triples
Code:
d                  directory
 rwx               owner
    r-x            group
       r-x         other

Cheers,
Tink
Thanks Tink
 
Old 08-20-2019, 05:59 AM   #6
sj1981
LQ Newbie
 
Registered: Aug 2019
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by grail View Post
I am pretty sure that if you use your exact words in google, ie ls output interpretation, at least one of the 4+million replies must have this information.
I would add that some of the information you provided is actually incorrect.
Ironically this post is the first result google shows when you do the exact search
 
Old 08-20-2019, 07:19 AM   #7
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,170

Rep: Reputation: 657Reputation: 657Reputation: 657Reputation: 657Reputation: 657Reputation: 657
Quote:
Originally Posted by JJJCR View Post
drwxr-xr-x 2 root root 4096 oct 9 2011 xml

d - directory
rwxr - permission for the owner
xr - permission for the group
x - permission for others
No, rwx (read/write/search) for the owner
r-x for the group (NO write permission)
r-x for "others" (non-owner nor in the group, which will be most users in this case)
These are 3 groups of 3 permission letters, - means NOT allowed

2 link count, you can forget about that (it will always be 2 + the number of SUBdirectories for a directory)
root root owner (not user) and group of this directory (cq file)
4096 current size of the file this directory IS.
In an ext? fs a directory will always be a multiple of the block size, that is:
mkdir allocates a full block and every extension will be allocated that too.
In other FS'es this may be different.
BTW: directories in ext? will never shrink, so a directory of, say, 16KB with only a single entry IN it is possible, if it used to contain more filenames.
 
Old 08-20-2019, 08:03 AM   #8
Jan K.
Member
 
Registered: Apr 2019
Location: Esbjerg
Distribution: slackware...
Posts: 157

Rep: Reputation: 72
ehartman, you *could* have posted that answer eight years ago!
 
Old 08-20-2019, 10:25 AM   #9
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,170

Rep: Reputation: 657Reputation: 657Reputation: 657Reputation: 657Reputation: 657Reputation: 657
Quote:
Originally Posted by Jan K. View Post
ehartman, you *could* have posted that answer eight years ago!
Yes, If I had been posting then AND seen this thread. But then I still was working so didn't have much time to post, I only sometimes looked here specificcally for problems I got then IN my job.
Now I'm retired I've got much more time to read/post (and have got a few years more experience in several Linux distro's too). So now I just look at a lot of the new postings (and someone did post a new msg in this thread).
 
Old 08-20-2019, 10:32 AM   #10
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,587

Rep: Reputation: 4347Reputation: 4347Reputation: 4347Reputation: 4347Reputation: 4347Reputation: 4347Reputation: 4347Reputation: 4347Reputation: 4347Reputation: 4347Reputation: 4347
not really, it was already explained several times, even here:

https://www.linuxquestions.org/quest...anyone-933845/
https://unix.stackexchange.com/quest...al-output-mean
https://www.garron.me/en/go2linux/ls...rmissions.html
 
Old 08-20-2019, 11:45 AM   #11
Jan K.
Member
 
Registered: Apr 2019
Location: Esbjerg
Distribution: slackware...
Posts: 157

Rep: Reputation: 72
Quote:
Originally Posted by ehartman View Post
Yes, If I had been posting then AND seen this thread. But then I still was working so didn't have much time to post, I only sometimes looked here specificcally for problems I got then IN my job.
Now I'm retired I've got much more time to read/post (and have got a few years more experience in several Linux distro's too). So now I just look at a lot of the new postings (and someone did post a new msg in this thread).
My favorite threads are the ones marked [Solved], but in this one I suddenly wondered why I was reading eight years old posts? And sure enough... a necro thread awaken by a first time poster...

Bet you didn't notice either, so fell for the urge to pull your leg!

Btw. like your posts a lot. Always very informative and helpful!
 
  


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
interpretation of /proc/pid/sched output GoelMudit Linux - General 1 01-06-2011 11:54 PM
Valgrind interpretation ancou Programming 2 11-17-2010 06:15 PM
netstat interpretation twlilinux Linux - Server 6 06-17-2008 05:59 PM
c: output interpretation kpachopoulos Programming 3 08-17-2006 10:34 AM
tcpdump interpretation unixbrain Linux - Networking 7 04-28-2004 05:37 AM

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

All times are GMT -5. The time now is 11:44 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