How do I interpret the results of the `ls -l` command?

25

9

I want to learn about the meaning of values for example first line;

drwxr-xr-x 2 ataka root 4096 2008-11-04 16:58 ataka

is ataka here the owner of directory ?

kioutsovkm@orkide:/users/lnxsrv2/ee$ ls
ataka  aydinoglu  izgordu  kioutsovkm  kocaogluo
kioutsovkm@orkide:/users/lnxsrv2/ee$ ls -l
total 20
drwxr-xr-x 2 ataka     root 4096 2008-11-04 16:58 ataka
drwxr-xr-x 2 aydinoglu root 4096 2008-11-04 16:58 aydinoglu
drwxr-xr-x 3 izgordu   root 4096 2009-09-29 11:59 izgordu
drwxr-xr-x 2 root      root 4096 2008-11-04 16:58 kioutsovkm
drwxr-xr-x 4 kocaogluo root 4096 2010-06-10 03:41 kocaogluo
kioutsovkm@orkide:/users/lnxsrv2/ee$

anarhikos

Posted 2010-08-04T11:56:12.217

Reputation:

Answers

47

Is ataka here the owner of directory?

Well, yes (third column), but it also happens to be the name of the directory (last column).

      +-permissions that apply to the owner
      |
      |     +-permissions that apply to all other users
      |     |
      |     |  +-number of hard links
      |     |  |
      |     |  |             +-size      +-last modification date and time
     _|_   _|_ |            _|__ ________|_______
    drwxr-xr-x 2 ataka root 4096 2008-11-04 16:58 ataka
        ___      _____ ____                       _____
         |         |    |                           |
         |         |    |                           +-name of file or directory
         |         |    |
         |         |    +-the group that the group permissions applies to
         |         |
         |         +-owner
         |
         +-permissions that apply to users who are members of the group

See man ls, man chmod and info ls or info coreutils 'ls invocation' for more information.

Paused until further notice.

Posted 2010-08-04T11:56:12.217

Reputation: 86 075

How are hard links counted ? – ychaouche – 2014-11-08T20:13:01.400

1@ychaouche: What do you mean? Whenever a hard link to a file is created or removed, the hard link count of that file is incremented or decremented. – Paused until further notice. – 2014-11-09T09:15:06.237

1What is the size of a directory? – Nick Retallack – 2014-03-04T01:16:41.570

@NickRetallack: What does size of a directory mean in output of 'ls -l' command?

– Paused until further notice. – 2014-03-04T02:39:50.127

1

Yes. ataka is an username and root is a group.

hsz

Posted 2010-08-04T11:56:12.217

Reputation: 111