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


 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions 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
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. Solaris

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... (1 Reply)
Discussion started by: sam09
1 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
BF_TAR(1)																 BF_TAR(1)

NAME
bf_tar - shell script to write a tar file of a bogofilter directory to stdout SYNOPSIS
bf_tar [-r] [-R] bogofilter_directory DESCRIPTION
bf_tar bundles a bogofilter working directory in tar format and copies it to standard output (your console, or where you redirect it, see EXAMPLES below). OPTIONS
The -r option causes bf_tar to remove inactive log files after the archive has been written successfully. The default is to leave log files. The -R option causes bf_tar to remove inactive log files before the archive is written. This may reduce chances that the resulting archive is recoverable should it become damaged. The archive may be smaller though. The default is to leave log files. EXIT STATUS
The script exits with status code 0 if everything went well, and nonzero if it encountered trouble. EXAMPLES
o bf_tar ~/.bogofilter > outfile.tar Writes a standard .tar file containing the essential files from ~/.bogofilter to outfile.tar. o bf_tar ~/.bogofilter | gzip -9 -c > outfile.tar.gz Writes a gzipped .tar.gz file containing the essential files from ~/.bogofilter to outfile.tar.gz. o bf_tar `pwd`/mydirectory > outfile.tar Prepend $(pwd)/ or `pwd`/ if you want to specify an absolute path instead of a relative path. NOTES
This script is meant for use with Berkeley DB based bogofilter versions. This script requires a SUSv2 compliant pax utility. This script expects a SUSv2 compliant shell. Solaris systems should have the SUNWxcu4 package installed (when bogofilter is configured) so that /usr/xpg4/bin/sh can be used. 07/23/2007 BF_TAR(1)