Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.
drwxr-xr-x. 2 root root 4096 Jun 29 16:44 db
drwxr-xr-x. 2 root root 4096 Jun 29 16:44 djproject
-rwxr-xr-x. 1 root root   38 Jun 29 16:44 index.html
drwxr-xr-x. 2 root root 4096 Jun 29 16:44 jobs
-rwxr-xr-x. 1 root root  252 Jun 29 16:44 manage.py
drwxr-xr-x. 3 root root 4096 Jun 29 16:44 templates

What is the meaning of those numbers in the second column? Do they have some relation to file and folder permissions? How do I change the numbers?

share|improve this question

migrated from stackoverflow.com Jul 2 '12 at 1:38

This question came from our site for professional and enthusiast programmers.

2  
You can just man ls –  VanDarg Jul 2 '12 at 1:36
2  
Please accept some of the answers to your previous questions. You can do this by clicking the check mark next to the answer that you feel best answered the question. –  bdonlan Jul 2 '12 at 1:37
    
info ls gives the information you need, man ls just points you to the info page. –  tpg2114 Jul 2 '12 at 1:37

3 Answers 3

up vote 9 down vote accepted

That's the number of hard links to the file or directory. For files, this will usually be 1, unless you've created additional hard links to it with ln.

For directories, it's 2 + the number of subdirectories. This is because a directory can be referred to either by its name in the parent directory, . in itself, or .. in each subdirectory.

share|improve this answer
    
got it ,thank you ,bdonlan –  Nick Dong Jul 4 '12 at 8:47

This indicates the number of hard links. This article explain the output of the ls -l command in more detail.

share|improve this answer
    
thank you for your reply, it also helped. –  Nick Dong Jul 4 '12 at 8:48

The numbers in the second column is effectively the number of "links" to the file or directory. It is similar to the concept of reference count in oop.

share|improve this answer
    
thank you for your time, ennuikiller. –  Nick Dong Jul 4 '12 at 8:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.