Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

number of links in ls -l

Status
Not open for further replies.

ddrillich

Technical User
Jun 11, 2003
546
US
Good Day,

I'm looking at:

wpcms1 # ls -lt
total 12
drwxrwsr-x 2 vgnuser vgngroup 512 Feb 28 04:00 tedtasksworkingdir
drwxr-sr-x 32 root vgngroup 1024 Feb 26 23:41 prod2_staticfiles
drwxr-sr-x 4 root vgngroup 512 Feb 25 14:23 prod_staticfiles
drwxrwsr-x 22 vgnuser vgngroup 512 Feb 7 13:03 staticfiles
drwxrwsr-x 2 vgnuser vgngroup 512 Apr 19 2004 sgutil
drwxrwsr-x 2 vgnuser vgngroup 512 Jan 10 2003 templatezipfiles

I don't understand what the number of links means. i.e. 2,32,4 etc.

Any ideas?

Thanks,
Dan
 
These are 'hard links' to the directory, generally related to the number of files in the directory below. If you do an ls -la | wc -l on one of these filesystems, it should return a number approximating to the links shown here.
 
Ken,

I did:
cd prod2_staticfiles
ls -la | wc -l

and got 35

So, I think I got it - it's the number of files in this directory.

Thanks,
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top