Unix script Unix script which counts no. of files/sub-files


 
Thread Tools Search this Thread
Operating Systems Solaris Unix script Unix script which counts no. of files/sub-files
# 1  
Old 02-11-2012
Unix script Unix script which counts no. of files/sub-files

Hi All,

For past some days iam trying, which not able to get to..so please help me on this..
My exact requirement is...

Step1: Find how many files/sub files exist in /some/path (maybe in multiple path)
Step2: Count the no. of files/sub files with their respective size.
Step3: Then a file has to be get created eg: Space.txt in /another/path with all above details (Step2).

Need your help. Thanks in advance.

Regards,
Rajesh
# 2  
Old 02-11-2012
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

UNIX Script to clean files

Hello All, I need a script that would delete files which are more than "X" number of days old, also if there can be a log file of the deleted files for reference. I am from windows background hence finding it difficult. Any help is much appreciated Regards Wert (4 Replies)
Discussion started by: wert468
4 Replies

2. Shell Programming and Scripting

Using Isql for SQL SERVER to get the table rows counts in UNIX shell script to

need to create shell script to read the table's name from file and connect SQL SERVER using isql (odbcunix) i 'm able connect to database with below command line syntex but i could not get working in shell script with SQL and storing the row count in variable. isql -v DSN USERNAME PASSWD ... (6 Replies)
Discussion started by: pimmit22043
6 Replies

3. Shell Programming and Scripting

Need help regarding comparison between two files through UNIX script

Hi All , I am aware of unix command ,but not comforable in putting together in script level.I came to situation where I need to compare between two .txt files fieldwise and need a mismatch report. As I am new to unix script arena ,if anyone can help in the below scenario that will be really... (9 Replies)
Discussion started by: STCET22
9 Replies

4. Shell Programming and Scripting

Comparison between two files through UNIX script

Hi All , As I am new to unix scripting ,I need a help regarding unix scripting .I have two .txt files .One is source file and another is target file.I need a script through which I can compare those two files.I need a automated comparison report in a directory after comparing between source &... (2 Replies)
Discussion started by: STCET22
2 Replies

5. Shell Programming and Scripting

UNIX/Perl script to call informatica source counts

Hi Guys, I am trying below condition . We are using Informatica 9.5 and scheduling certain informatica mapping on set timings .But we are not sure whether the database source table are latest or not .Since its gets updated on daily basis and not sure when it completes.Can we write any unix/perl... (1 Reply)
Discussion started by: Perlbaby
1 Replies

6. UNIX for Dummies Questions & Answers

How to take input from two files in a UNIX script?

I have a simple script which returns me the response from a table. while read -r xx do db2 -x "select * from Table where user ='$xx' with ur " >> "/home/Results.txt" done < "/home/USERS.txt" Now I want to have two different clause in the where clause and want the script to take input... (4 Replies)
Discussion started by: Sanjeev Yadav
4 Replies

7. UNIX for Dummies Questions & Answers

Unix Script to compare two files

Hello, I have a dat file nctilllist.dat which will be present in the directory path "/usr/lpp/web-data/mfg/nct/file-data/nctilllist.dat" nctillist.dat will have reference to files like DP100001.jpg,DP10002.PDF,DP100003.doc on the path /usr/lpp/web-data/mfg/nct/file-data will have... (12 Replies)
Discussion started by: gayathrivm
12 Replies

8. Homework & Coursework Questions

Unix script Unix script which counts no. of files/sub-files

Hi All, For past some days iam trying, which not able to get to..so please help me on this.. My exact requirement is... Step1: Find how many files/sub files exist in /some/path (maybe in multiple path) Step2: Count the no. of files/sub files with their respective size. Step3: Then a file... (0 Replies)
Discussion started by: sam09
0 Replies

9. Shell Programming and Scripting

How to attach two files in unix script

Hi, My script has to send 2 files as a separate attachment(Note : files to be sent without zipping) to the specified email id. Below code was used but it is not attaching the file as expected instead the file contents are displayed in the body of the email. Kindly,help with your... (22 Replies)
Discussion started by: meva
22 Replies

10. Shell Programming and Scripting

delete old files thru unix script

I have to delete files older than 60 days from a windows directory. So I tried to include this script FTP_LOG=${DATA_TOP}/data_tmp/logfile FTP_CMDS=${DATA_TOP}/data_tmp/cmdfile echo "open ftp1" > ${FTP_CMDS} echo "user anonymous local" >> ${FTP_CMDS} echo "cd ${SRC_DIR}" >> ${FTP_CMDS} echo... (3 Replies)
Discussion started by: snair001
3 Replies
Login or Register to Ask a Question