What does each part of the `ls -la` output mean? [duplicate]

Let’s take this one to analyse:

-rwxrw-r-- 1 root    root       4096 Dec 18 16:41 somefile.txt

We will split the output for better understanding.

Field1  Field2  Field3  Field4  Field5  Field6  Field7  Field8  Field9        Field10

-       rwx     rw-     r--     1       root    root    4096    Dec 18 16:41  somefile.txt
  • First field:

    • - for regular file, d for Directory, l for symlink
  • Second: The owner can read, write and execute this file

  • Third: The owner's group can read and write this file

  • Fourth: Other users can read, but not write or execute this file.

  • Fifth: The number of hard links to this file or directories inside this directory.

  • Sixth: The object's owner

  • Seventh: The object's owner's group. All of the users in this group (for example, root, user, www-data, etc.) are affected by the permissions in field 3.

  • Eighth field is the object's size in bytes. Note: ls -lh will use k, M, G, T etc. for human readable. (See man ls or run ls --help.)

  • Ninth field: The object's last modified time; for directories this is not inheritive.

  • Tenth field: The object's name as stored in the filesystem's table of contents

See understanding the Unix permission model, man chmod and apropos permissions for more information.

Note: Some versions of ls(1) also display the octal permissions, which are a simple way of using a number to display and store the first through fourth fields.


The numbers represents:

1 is the number of hard links

7160 the file size in bytes.