The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Listing directories and sub directories jinxor UNIX for Advanced & Expert Users 3 03-11-2008 06:27 AM
searching content of files in the current and sub directories tiger99 Shell Programming and Scripting 4 01-22-2008 11:11 PM
Searching in VI andyblaylock UNIX for Dummies Questions & Answers 1 11-28-2007 04:32 PM
moving directories to new directories on multiple servers mackdaddy07 Shell Programming and Scripting 0 04-06-2007 08:30 AM
searching for list of empty directories man80 Shell Programming and Scripting 4 10-15-2004 01:00 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-29-2004
Registered User
 

Join Date: Sep 2004
Posts: 8
Stumble this Post!
Unhappy searching through directories

Please help. I am getting back into UNIX and I need a script that requires me to start in one main directory (call it mydata) and under this directory searches several subdirectories within subdirectories. I need to search each directory to locate *_source and delete files within the directory (which is a parameter from the script, got that part) within the *_source directory. I keep messing up the syntax and I need it to run through without specifiing the directories (in case there is one added or several deleted in the course of time).

THANK YOU !!!

MrJaunty

Last edited by MrJaunty; 09-29-2004 at 08:07 PM.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 09-29-2004
Registered User
 

Join Date: Jul 2004
Location: New York State
Posts: 65
Stumble this Post!
I am not sure what you are asking for. Do you want to find and erase all files of the form *_source in My_data and all subdirectories below?
Reply With Quote
  #3 (permalink)  
Old 09-29-2004
Registered User
 

Join Date: Sep 2004
Posts: 8
Stumble this Post!
sorry - hope explaination here is better

Trying to locate what subdirectories of Mydata contain a directory *_source. Some subdirectories may contain more than one *_source directory. Once found, I would need to go into the *_souce directory looking for a directory (01-12, which was specified as a parameter when first ran the script) and then finally go into that 01-12 directory and remove all files in that directory only...

I hope I explained that better ...

thank you for reply and help !!!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:24 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0