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
cscope-indexer(1)					      General Commands Manual						 cscope-indexer(1)

NAME
cscope-indexer - Script to index files for cscope SYNOPSIS
cscope-indexer [-v] [-f database_file] [-i list_file] [-l] [-r] DESCRIPTION
This script generates a list of files to index (cscope.out), which is then (optionally) used to generate a cscope database. You can use this script to just build a list of files, or it can be used to build a list and database. This script is not used to just build a data- base (skipping the list of files step), as this can be simply done by just calling "cscope -b". Normally, cscope will do its own indexing, but this script can be used to force indexing. This is useful if you need to recurse into sub- directories, or have many files to index (you can run this script from a cron job, during the night). It is especially useful for large projects, which can contstantly have source files added and deleted; by using this script, the changing sources files are automatically handled. Currently, any paths containing "/CVS/" or "/RCS/" are stripped out (ignored). OPTIONS
-f database_file Specifies the cscope database file (default: cscope.out). -i list_file Specifies the name of the file into which the list of files to index is placed (default: cscope.files). -l Suppress the generation/updating of the cscope database file. Only a list of files is generated. -r Recurse into subdirectories to locate files to index. Without this option, only the current directory is searched. -v Be verbose. Output simple progress messages. SEE ALSO
cscope(1) AUTHOR
This manual page was written for the Debian GNU/Linux system by Robert Lemmen <robertle@semistable.com> (but may be used by others, of course) Script to index files for cscope 30. December 2002 cscope-indexer(1)