|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 !! |
![]() |
|
|
Search this Thread |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
Can you be a bit more specific on what "something different" means? Explain your requirements.
|
|
#3
|
|||
|
|||
|
You are right, tell me what is in your mind to solve this problem. THank you
|
|
#4
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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}"
doneLast edited by methyl; 03-15-2010 at 11:41 AM.. |
| Sponsored Links | ||
|
|
![]() |
| Tags |
| erase, script, trace |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
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 |