Please Help Me...

 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications Please Help Me...
# 1  
Old 04-21-2010
Please Help Me...

Hi,

I am beginner using unix. I want you to help anybudy to show me the script to count data in directory....below this my directory....

Code:
/ebs/home/ebs_dba/nazrul/temp
MKZSX510>ll
total 0
-rw-r--r--   1 ebs_dba    users            0 Apr 19 16:50 blabla.edi
-rw-r--r--   1 ebs_dba    users            0 Apr 19 16:50 filename.std
-rw-r--r--   1 ebs_dba    users            0 Apr 19 16:50 first.txt
-rw-r--r--   1 ebs_dba    users            0 Apr 19 16:50 second.txt
-rw-r--r--   1 ebs_dba    users            0 Apr 19 16:50 whatever.bat


Last edited by pludi; 04-21-2010 at 01:57 AM..
# 2  
Old 04-21-2010
What data you want to count?
# 3  
Old 04-21-2010
i want to script to show total all this file below.
Code:
 
rw-r--r-- 1 ebs_dba users 0 Apr 19 16:50 blabla.edi 
-rw-r--r-- 1 ebs_dba users 0 Apr 19 16:50 filename.std
 -rw-r--r-- 1 ebs_dba users 0 Apr 19 16:50 first.txt 
-rw-r--r-- 1 ebs_dba users 0 Apr 19 16:50 second.txt 
-rw-r--r-- 1 ebs_dba users 0 Apr 19 16:50 whatever.bat

# 4  
Old 04-21-2010
why you want to use script?

I think you can easily do this by this command

ls -l dirname
# 5  
Old 04-21-2010
The total of what? What data do you want to count? The total size of the files? The total number of the files? Some sum derived from an obscure algorithm involving these files, a chicken, and a bucket of goat blood?
# 6  
Old 04-21-2010
I want use script because i have a task to count data for each directory that given.So I want try first how it execute...You understand what i mean..Hope you can help me..
# 7  
Old 04-21-2010
From your output I think that it is not having the total line.
So do you want like this?

Code:
ls -l | sed '1d'

Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question