Script for tracking from directory to file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script for tracking from directory to file
# 1  
Old 02-27-2009
Script for tracking from directory to file

Hi ,
I am pretty new to scripting, and I trying to write a script which is not working as I expect to ....

I am trying to write a script which starts from top directory and tracks all the folders and sub-folders till it reaches a file and gives the list of files as output for a given subfolder/folder/directory.

consider I have a directory "DIR" with in that there are 8 floders (Folder1.......Folder8) with in each folder there may have sub-folders or files.So I am expecting the script to start from the top level
go through each subfolder and manipulate the files

File Identification:Will have string "file (xyz,xyz)"



Can any body help me out with this.



Please let me know if my question is not clear, I will try to elobarate it more clearly.

Thanks in advance for HelpSmilie
# 2  
Old 02-27-2009
Pls post your sample script that you have prepared...
# 3  
Old 02-27-2009
Question

What do you mean by :
Quote:
File Identification:Will have string "file (xyz,xyz)"
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 -Tracking File I/O

Hi Team, I have a requirement. We are processing 100s of thousands of files and had to tar 10K files each The problem I face is, I would need to add the file into tar only when the write operation in the file is complete. How would I achieve this. OS : Sun Solaris 5.8 Shell : KSH ... (7 Replies)
Discussion started by: mr_manii
7 Replies

2. Shell Programming and Scripting

Shell script cannot create directory and move the file to that directory

I have a script, which is checking if file exists and move it to another directory if then mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly ... (9 Replies)
Discussion started by: digioleg54
9 Replies

3. Shell Programming and Scripting

Shell scripting-I need a script which should watch a directory for a file with specific directory

I need a script which should watch a directory for a file with specific directory. If it finds a file in directory, it should search for few specific keyword in the file. if the keyword exists, it should trim string from specific column. The file should be moved to another directory and the a... (8 Replies)
Discussion started by: akashdeepak
8 Replies

4. UNIX for Dummies Questions & Answers

Tracking the script(.sh) files triggered on daily or monthly basis from source

Hi Gurus, Is there any solution for tracking the script(.sh) files triggered on daily or monthly basis from source - Datastage (Routines) Needs to find out if this scripts are running on daily just want to know that is there anything to track Thanks in Advance (2 Replies)
Discussion started by: SeenuGuddu
2 Replies

5. Red Hat

Tracking All session history in one file

Dear All, I want to keep all the session history in one file,please help me out to configure so. Here is the test scenario- Suppose i have three client A,B and C tries to log in to one Server XA there session specific command and Clint IPADDRESS should get logged in one file...like ... (0 Replies)
Discussion started by: monojcool
0 Replies

6. Shell Programming and Scripting

Tracking change inside the script

we have more then 10 jobs scheduled in cronjob.. but we can see some of the script has been changed without any notification.. can we write any script which captures any changes inside the scripts with time of change and user name like .. or any other option apart from this ?? Plz help .. (4 Replies)
Discussion started by: netdbaind
4 Replies

7. Programming

Need a tracking PHP Script – “how long people stay on the website?”

I want to know, is there a way to track how long anyone has been logged into website and then insert it up for each time they have logged on. In case, user a logs in for 30 minutes, then later comes back and logs in for an hour, then later comes back and logs in for 50 minutes, Add... (1 Reply)
Discussion started by: AimyThomas
1 Replies

8. Shell Programming and Scripting

Script which removes files from the first directory if there is a file in the second directory

Script must removes files from the first directory if there is a file with same name in the second directory Script passed to the two directories, it lies with them in one directory: sh script_name dir1 dir2 This is my version, but it does not work :wall: set - $2/* for i do set -... (6 Replies)
Discussion started by: SLAMUL
6 Replies

9. Shell Programming and Scripting

Another question for tracking failed logins via script

Hello Experts, I have this initial shell script that tracks failed login attempts: #!/bin/bash #Fetch failed user logins to file failed-logins.txt grep -i failed /var/log/secure | awk '{ print $1, $2" ", $3" ", $9" ", $11 }' > failed-logins.txt #Splitting the failed-logins in... (10 Replies)
Discussion started by: linuxgeek
10 Replies

10. Shell Programming and Scripting

Shell script in tracking both the passed and failed login in a unix server

Can you help me in providing the following output or a quite similar to this from a shell script ? *** Logins Summary Information ***** ---------------------------------- Failed Login Attempts for Invalid Accounts Date Time IP-ADD Account ... (0 Replies)
Discussion started by: linuxgeek
0 Replies
Login or Register to Ask a Question