Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am wondering what the number 1234 means in this example:

rw-rw-rw- 1234 blabla blabla 3243253235 14:40
share|improve this question

migrated from Jun 12 '12 at 18:08

This question came from our site for system and network administrators.

The stat utility usually gives you more convenient access to the information you need in the way you need it. – 0xC0000022L Jun 12 '12 at 18:12
up vote 4 down vote accepted

From man ls

If the -l option is given, the following information is displayed for each file: file mode, number of links, owner name, group name, number of bytes in the file, abbreviated month, day-of-month file was last modi- fied, hour file last modified, minute file last modified, and the path- name. In addition, for each directory whose contents are displayed, the total number of 512-byte blocks used by the files in the directory is displayed on a line by itself, immediately before the information for the files in the directory. If the file or directory has extended attributes, the permissions field printed by the -l option is followed by a '@' character. Otherwise, if the file or directory has extended security information (such as an access control list), the permissions field printed by the -l option is followed by a '+' character.

In short, it is the number of links to that file.

share|improve this answer

That means the links to that file or directory's inode. Hard links I mean, not soft links:

[root@biggiesmalls agsantovena]# touch test
[root@biggiesmalls agsantovena]# ls -l
total 0
-rw-r--r-- 1 root root 0 Jun 12 10:50 test
[root@biggiesmalls agsantovena]# ln test test2
[root@biggiesmalls agsantovena]# ls -l
total 0
-rw-r--r-- 2 root root 0 Jun 12 10:50 test
-rw-r--r-- 2 root root 0 Jun 12 10:50 test2
share|improve this answer

The "number of links" to a file or directory is basically the number of names it has (and the names do not have to exist in the same directory, but they do have to exist on the same filesystem — hard links cannot cross filesystem boundaries).

Note that a directory with subdirectories will have a link for each occurrence of the name .. in each subdirectory, since the .. directory is nothing but a hard link to the parent directory.

share|improve this answer
The note about the subdirectory .. entries was particularly helpful, thanks! – kkhugs Oct 7 '14 at 17:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .