Making a script for .trc


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Making a script for .trc
# 1  
Old 03-12-2010
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.
# 2  
Old 03-12-2010
Can you be a bit more specific on what "something different" means? Explain your requirements.
# 3  
Old 03-12-2010
You are right, tell me what is in your mind to solve this problem. THank you
# 4  
Old 03-12-2010
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
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
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 01:41 PM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Help me making this script

This script is executed whenever a new vehicle is added to the cycle-motor park of campus. The script asks for the following information about the car and adds a new line to the vehicle file.txt: name (name of an animal, unique identifier), color, mark, model, type (e.g., electrical, manual),... (2 Replies)
Discussion started by: andre2222
2 Replies

2. Shell Programming and Scripting

Making any script executable

Hi all, I'm new to Unix so just wanted some help. I've been self learning and came accross a question online that I was trying. It is to make any shell script executable, the name of the file is to be made executable. I would use nano and type in something like #! /bin/bash Chmod +x... (4 Replies)
Discussion started by: HelenaR
4 Replies

3. Shell Programming and Scripting

Need Help With making this script

Hello, im a new user on this site and learning scripting very slowly at a understanding pace. However i am up with a challenge and require help completing this. The script has to include arguments, variables, decisions and loops. So the script is about calculating the broadcast address for any... (5 Replies)
Discussion started by: tHe666
5 Replies

4. Shell Programming and Scripting

I could use some help with making a script

I run a small instrument lab. We track our user's time on the instruments with a very manual process of 'last wtmp.1' then cut/paste data into spreadsheets. My boss makes the initial spreadsheets then I convert and format them for uploading into our billing software (COReS). Cores is looking for a... (8 Replies)
Discussion started by: jpontius
8 Replies

5. Shell Programming and Scripting

making shell script

Hi , I am new to shell scripting I want to make script as to execute followng command mysqldump -u (user name) -p(password) database name>filename.sql this file saves with current date and time and execute automatically at particular time which I give (10 Replies)
Discussion started by: kaushik02018
10 Replies

6. AIX

.trc files

can we delete .trc files and old error log files from /var/adm/ras directory in order to free up /var. Also what to delete from /var/tmp ? (1 Reply)
Discussion started by: kkhan
1 Replies

7. Shell Programming and Scripting

making a archive script

Hi All: I'm not much of a script writer so I could use your input. Here's the objective... Need a script that will archive (tar) files based on date and then move them into an archive directory. The file names are as follows... S20070101.001 Year month day S20070102.001 As you can see... (1 Reply)
Discussion started by: jimmyc
1 Replies

8. Shell Programming and Scripting

making script

hello experts cany any one help me i want to make one script which can rlogin to another machine . but it should not ask me username/password from me of another machine it should take the username and password from the script only. please help me out. regards, shary (2 Replies)
Discussion started by: shary
2 Replies

9. Shell Programming and Scripting

Need help making a script

Here is what I have: #!/bin/bash # Setup year date and month YR=`date +%Y '{print $6}'` MON=`date +%b '{print $2}'` DAY=`date +%d '{print $3}'` file=$YR$MOY$DOM # clear # Dump database using USER/PASS to ..sql mysqldump --user=me -ppass database > database-db.$file.sql The YR, MON and... (2 Replies)
Discussion started by: npereira
2 Replies

10. Shell Programming and Scripting

Making a script exectuable

Hi, I'm pretty new to Unix and I just have a question concerning making a script executable without putting the "sh" command before it. In case it makes the difference I am on an Apple computer using the Terminal. Anyway here is the little test code I wrote followed by the commands I took to try to... (5 Replies)
Discussion started by: BuyoCat
5 Replies
Login or Register to Ask a Question