-6

I'm wondering, what this particular entry of the output of ls -l means. Could someone please explain the meaning of the fields?

-rwxr-xr-x 1 root root 920788 Mar 28 2013 bash
Invoker
  • 1,393
  • 1
  • 16
  • 21
banter
  • 69
  • I think the fact that this question gets asked so many times is proof of poor documentation. The manpage says nothing on the topic – Post Self Jul 22 '22 at 07:36

1 Answers1

7

The first block (-rwxr-xr-x) means that

  • the first character signifies the type of file. '-' for file and 'd' for directory 'l' for a link.
  • It is readable, writeable and executable by the user (the first triple rwx)
  • It is readable and executable by the group (the second triple r-x)
  • It is readable and executable by anyone (the third triple r-x)

The 1 represents number of links (names) for this file.

The next is that the file is owned by the user root (the first root) and the group root (the second root).

Then the file size is printed (920788 bytes in this case).

Then the creation date of the file (in this case Mar 28 2013) is printed. This could also be formatted like Mar 28 08:15 if the year is the current year.

Finally the name of the file (bash in this case) is printed.

Toby Speight
  • 8,678