What's the second column of ls -l say?

Possible Duplicate:
What is the number between file permission and owner in ls -l command output?

I’ve been using Linux for years now and I’m embarrassed to say that until now I didn’t notice that I have no idea what the second column of ls -l means:

-r--r--r-- 1 roic develop1 roic  685 2012-10-11 14:15 API.h

In this example – 1. What does it stand for?

Asked By: Reed


It is the no. of the links that the file is having…links is the nothing but different names of the same file

Links are of two type hard and soft links

use the following code:

    ln file1 file2 #ln command creates file2 as a link of file 1
    ls -l file1

This will show 2 in place of 1 bcoz file1 has two names
Now file1 and file2
Now same file can be used by two different names


Answered By: user1678213
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.