The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
display the result of wc -l with words before and after the result melanie_pfefer UNIX for Dummies Questions & Answers 3 04-30-2008 07:33 AM
if [ ! -r ${1} ] meaning in ksh naveeng.81 Shell Programming and Scripting 1 04-09-2008 01:47 PM
Outputting formatted Result log file from old 30000 lines result log<help required> vikas.iet Shell Programming and Scripting 5 12-02-2007 10:43 PM
executing script by cron doesnt give me expected result anchal_khare UNIX for Advanced & Expert Users 1 09-12-2007 08:07 AM
what is the meaning here? forevercalz Shell Programming and Scripting 2 09-29-2005 12:46 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-22-2007
cy163 cy163 is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 27
meaning of columns in the result of executing 'ls -l'

Hello all,

I do not understand the meaning of some columns in the result of executing 'ls -l'. For example, i got the following result by run 'ls -l'

total 3531


-rw-r--r-- 1 root root 1351680 Oct 17 20:50 fileindex.rpm
-rw-r--r-- 1 root root 16384 Oct 17 20:50 groupindex.rpm
-rw-r--r-- 1 root root 16384 Oct 17 20:50 nameindex.rpm
drw-r--r-- 2 root root 233 Oct 17 20:50 dirA


I do not know

(1) what does the 'total 3531' mean in the first line
(2) what is the meaning of the second column, i.e., containing the number 1, 1, 1, 2.
(3)What is the meaning of the fifth column for a directory, such as the number '233' for the directory 'dirA'.


thanks
  #2 (permalink)  
Old 09-22-2007
pbsrinivas pbsrinivas is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 141
total 3531 --- total no.of block used in the directroy



Second column lists the number of hard links to that entry


When the size of the files in a directory are listed, the ls command
displays a total count of blocks, including indirect blocks.
  #3 (permalink)  
Old 09-22-2007
cy163 cy163 is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 27
Quote:
Originally Posted by pbsrinivas View Post
total 3531 --- total no.of block used in the directroy



Second column lists the number of hard links to that entry


When the size of the files in a directory are listed, the ls command
displays a total count of blocks, including indirect blocks.

pbsrinivas , thanks for your quick reply.

Do you mean the number '233' is the total number of blocks used by the directory 'dirA'.

How can i know/calculate the size in byte of a directory from the number of blocks used by the directory.
  #4 (permalink)  
Old 09-22-2007
pbsrinivas pbsrinivas is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 141
du -k . will give u in KB..
  #5 (permalink)  
Old 09-22-2007
cy163 cy163 is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 27
Quote:
Originally Posted by pbsrinivas View Post
du -k . will give u in KB..
thanks again,

But, what on earth does the number '233' mean for the directory 'dirA'?
  #6 (permalink)  
Old 09-22-2007
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,847
In Unix it's the size allocated for the directory itself (the file meta-data).
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:20 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0