Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
google site



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Reply
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Search this Thread
  #1  
Old 03-12-2010
Registered User
 

Join Date: Jul 2008
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Making a script for .trc

People i need to do a script something like depura. to eliminate the .trc, the traces of a data base, i know that you cand usea find end exec but i need somethoing diferent in the script can anybody gimme any ideas?

Thank you very mucha for your time.
Sponsored Links
  #2  
Old 03-12-2010
Registered User
 

Join Date: Oct 2009
Location: St. Louis, MO
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Can you be a bit more specific on what "something different" means? Explain your requirements.
  #3  
Old 03-12-2010
Registered User
 

Join Date: Jul 2008
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
You are right, tell me what is in your mind to solve this problem. THank you
  #4  
Old 03-12-2010
Registered User
 

Join Date: Mar 2008
Posts: 2,350
Thanks: 8
Thanked 65 Times in 64 Posts
1) Is this about Oracle?
2) What is the name of the directory containing the ".trc" files ?
3) Which files do you want to keep ?
  #5  
Old 03-15-2010
Registered User
 

Join Date: Jul 2008
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
1) yes
2) name of the base / udump
3)15 days of history, for example today i erase all from Feb and leave march (15 march is today)
  #6  
Old 03-15-2010
Registered User
 

Join Date: Mar 2008
Posts: 2,350
Thanks: 8
Thanked 65 Times in 64 Posts
A general solution for you to adapt and test thoroughly before deleting anything.



Code:
find my_trace_directory -type f -name \*\.trc -mtime +15 -print | \
                while read trace_file
                do
                        # Remove echo when sure
                        echo rm "${trace_file}"
                done


Last edited by methyl; 03-15-2010 at 11:41 AM..
Sponsored Links
Reply

Tags
erase, script, trace

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Making a script for editing iwatk003 UNIX for Dummies Questions & Answers 2 12-19-2009 04:02 AM
making a archive script jimmyc Shell Programming and Scripting 1 09-15-2007 04:02 AM
making script shary Shell Programming and Scripting 2 06-03-2007 04:16 PM
Need help making a script npereira Shell Programming and Scripting 2 01-06-2007 12:14 PM
Making flags for my script rcunn87 Shell Programming and Scripting 6 06-29-2006 10:23 AM



All times are GMT -4. The time now is 09:20 PM.