Delete logs or trace file in current directory

how to delete before 5 days trace files or alert log in the current directory.

Syntax
find /path -name '*.trc' -mtime +days -exec command {} \;
Example
find /backup -name '*.log' -mtime +5 -exec ls -ltr {} \;
find /backup -name '*.trc' -mtime +5 -exec ls -ltr {} \;
find /backup -name '*.log' -mtime +5 -exec rm -rf {} \;
find /backup -name '*.trc' -mtime +5 -exec rm -rf {} \;
Edited by: hitgon on Jun 26, 2012 9:44 AM

Similar Messages

  • Delete audit and trace files

    Is anyone aware of why we should not delete audit and trace files under the oracle admin directory that are over 30 days old? I don't know that there is anything in place to do this and they are building up. Tuldcorpadb01:/oracle is at 96%. These files aren't that big, but there are a lot of them. See counts below.
    oracle:tuldcorpadb01:ecmd> cd admin
    oracle:tuldcorpadb01:ecmd>find . -name \*.aud -type f -ctime +30 -ls|wc -l
    25149
    oracle:tuldcorpadb01:ecmd>find . -name \*.trc -type f -ctime +30 -ls|wc -
    2426

    Move older audit files to a different filesystem until you find someone being able to define what files can be deleted.
    Regards
    Gustavo Restuccia

  • Useful logs and trace files

    Hello experts, for our Netweaver AS administration, I am in charge of periodically checking logs and trace files. I would like to know which are the most useful logs and trace files and the information each one will hold. I am familiar with "DefaultTrace.trc", and as of today it is the only one I have used, but I believe I should also be looking at other logs and trace files.
    Any suggestions?

    Hi Pedro,
    If you are talking about JAVA only system defaulttrace is the best log/trace to look, there are other log files like application log, but maybe the best way to check you logs is using NWA (NetWeaver Administrator) on the following URL on your JAVA system:
    http://<hostname>:<port>/nwa
    From there you need to go to Monitoring -> Logs and Traces and then Predefined View/SAP logs.
    My other recommendation is to change the severity level to ERROR for all you JAVA component within the Visual Administrator -> ServeNode -> Services -> Log Configurator -> Locations, otherwise it is possible that you see a lot of garbage on the defaulttraces. Anyway you can change the severity level per component, on demand, to investigate any possible problem.
    The work directory is very imporant and maybe you can also check the file "dev_serverX" that also will give you information about any out of memory conditions and garbage collection activity if you have these values set for the server node using the config tool:
    -verbose:gc
    -XX:+PrintGCDetails
    -XX:+PrintGCTimeStamps
    You can find more information on here:
    http://help.sap.com/saphelp_nw70/helpdata/en/ac/e9d8a51c732e42bd0e7de54b9ff4e2/content.htm
    Hopefully this help you, let me know if you need more information,
    Zareh

  • Redirect all logs e trace files.

    How can I redirect all the logs and trace files in the WebAS Java to a different directory?
    Tks for the help.
    José Simões

    Hi Jose,
                       You can't change the standard directory. So you better look for an work around.
    Regards,
    Hari.

  • Timestamp in Java log and trace files.

    Hi SAP'ies
    Running PI 7.11 on AIX 6.3 we face an issue with the content of log and trace files from Java.
    Eg.
    The file DefaultTrace_00.0.trc is timestamped 18-05-10 11:16:15. (The same time as the time of the OS/AIX)
    Looking inside the file the last statement is timestamped 2010 05 18 09:16:15.
    How can we ensure that the content of these Java files are timestamped with OS time?
    Looking into ABAP files like dev_w0 the timestamp of the file and the content are equal.
    Best regards,
    Teddy Løv Andersen

    Hello All
    Best way to convert the default trace time is , visit the site
    http://www.csgnetwork.com/epochtime.html
    here enter , for example if you have the following in default trace
    #1.#00265510DE7300120000000F000022030004C77AD7309DF5#1345230317066#com.sap.portal.fpn.rdl
    1345230317066   is time stamp , enter this in the above site to get the time
    Fri Aug 17 2012 21:05:17 GMT+0200
    Regards

  • How to create a file in current directory

    hi,
    I want to create a file in a current directory, But when i written following
    code then it cannot create file, How i will create file in current directory?
    Is there anyone who can help me?what will be the solution of this problem?
    Please give me solution
    String dir=application.getRealPath("/");
         int count;
         String filename="sample.txt";
         out.println(dir+filename);
         FileOutputStream fout=new FileOutputStream(filename);
         PrintStream p;
         p=new PrintStream(fout);
         p.print("1");
         p.close();with regards
    Bina

    hi,
    my problem is that my path is ok...but when i open file in this directory then
    it cannot open a file, is there anyone who can do it? When a user save data in server from remote
    area then what will be path of my code? how i will solve it? please give me
    solution.
    with regards
    bina

  • External portal capturing internal portal URL in Log and trace file

    Hi,
    We are facing one issue in portal like we have two portals for internal (Intranet) and external (Internet) users.
    Once users logged in the application and try to get the information about mylink from the external portal link (internet) they should not get any information about the internal portal.
    But in log and trace file we can see the external portal link capturing the internal portal URL.
    We need to find, from where system capturing the internal portal URL.
    Thanks.

    The tkproffed trace file is in seconds.
    "set timing" is in hh:mi:ss.uu format. So 00:00:01.01 is 1.01 seconds.
    You have to remember that most of these measurements are rounded. While your trace file says it contains one second of trace data, you know it's more.
    One excellent resource for trace files is "Optimizing Oracle Performance" by Cary Millsap & Jeff Holt. (http://www.amazon.com/Optimizing-Oracle-Performance-Cary-Millsap/dp/059600527X ) I thought I knew trace files before, but this book brings your knowledge to a whole new level.
    There is also an excellent WP by Cary Millsap ( http://method-r.com/downloads/doc_details/10-for-developers-making-friends-with-the-oracle-database-cary-millsap ) that gives you some insight.

  • How to configure logs and trace files

    Hello people,
       We have just implemented ESS-MSS, we have around 25000 people using this service and every 2 days my logs and trace file in server gets full and portal gets down.
    Please suggest how to solve this problem,how can i reduce trace and log files,,,,,any configuration or setting is there to configure this...please suggest and explain how can it be done.
    Biren

    Hi,
    You can control what messages gets logged depending on the severity.
    This can be configured using Log Configurator, check this how you can set severity to different locations.
    Netweaver Portal Log Configuration & Viewing (Part 1)
    Regards,
    Praveen Gudapati

  • Removing alert logs and trace files

    Hi everyone!
    I noticed that in all the oracle databases, the trace files are piling and alert log is growing like anything ....
    Thought of making a copy of the trace files somewhere and remove them from the hard disk excluding the most recent ones.
    For alert log, thought of making a copy and renaming the current file so that Oracle can create a new one.
    Any advice if there are better approaches in handling this?
    Thanks in advance.

    user645399 wrote:
    Hi everyone!
    I noticed that in all the oracle databases, the trace files are piling and alert log is growing like anything ....
    Thought of making a copy of the trace files somewhere and remove them from the hard disk excluding the most recent ones.
    For alert log, thought of making a copy and renaming the current file so that Oracle can create a new one.
    Any advice if there are better approaches in handling this?
    Thanks in advance.I would include the alert log file in my backup strategy as it includes many important information; database parameter values,when and how the database was shut down, the important database errors and when they occur , etc ... I usually backup the alert log file once a month and keep 1 year of alert log file copies..

  • How to read files from current directory for applet

    I have an applet that needs to read some audio files located in its current directory on the server and I just can't seem to figure it out...maybe I am being dumb...any help?

    You can use the ListSorter File Adapter Configuration property to sort based on timestamp. Basically add the following property to the inbound JCA file:
    <property name="ListSorter"
    value="oracle.tip.adapter.file.inbound.listing.TimestampSorterAscending"/>
    <property name="SingleThreadModel" value="true"/>
    More info see section 4.2.6 in http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_file.htm

  • E-mailing report attempts to write temp file in current directory

    When e-mailing a report from the previewer, Reports 6.0 attempts to write a temporary file in the current NT directory. This file is the actual e-mail attachment, in this case a PDF file.
    Unfortunately the current directory is where the application resides, and therefore users do not have write permission. Is there any way to re-direct where the temporary file is created (i.e. a local drive or the Windows temp directory)?
    Thanks in advance.

    change your registry key entry which says
    REPORTS60_TMP to which ever dir you want

  • Alert log and Trace file error

    Just found this in one of our alertlog file
    Thread 1 cannot allocate new log, sequence 199023
    checkpoint not complete
    and this in trace file:
    RECO.TRC file
    ERROR, tran=7.93.23662, session# =1, ose=60:
    ORA-12535: TNS: operation timed out

    Why would you increase the log files when the problem is a distributed transaction timed out?
    Distributed transactions time out when the data they need to access is locked. Unlike a local session that wants to update a row, which will wait forever, a distributed transaction times out. In earlier versions of Oracle you could set init.ora parameter distributed_lock_timeout to manage the timeout period. Oracle has since made this into an underbar parameter.
    The solution is to ignore the problem unless it appears regularly in which case you have an application design issue.
    HTH -- Mark D Powell --

  • Agent10g: Size of Management Agent Log and Trace Files get oversize ...

    Hi,
    I have the following problem:
    I had installed the EM Agent10g (v10.2.0.4) on each of all my Oracle servers. I've done a long time ago (a few months or a few years depending on wich server it was installed). Recently, I've got PERL error because the "trace" file of the Agent was too big (the emagent.trc was more than 1 Gb) !!!
    I don't know why. I checked on a particular server on the AGENT_HOME\sysman\config (Windows) for the emd.properties file.
    The following properties are specified in the emd.properties file:
    LogFileMaxSize=4096
    LogFileMaxRolls=4
    TrcFileMaxSize=4096
    TrcFileMaxRolls=4
    This file had never been modified (those properties correspond to the default value). It's the same situation for all Agent10g (setup) on all of the Oracle Server.
    Any idea ?
    NOTE: The Agent is stopped and started weekly ...
    Thank's
    Yves

    Why don't you truncate the trace file weekly. You can also delete the file. The file will be created automatically whenever there is a trace.

  • Delete log and temp files

    Hi. i want to delete files in folders
    appltmp and logs, because they both are using 4GB in my HDD.
    is it posible to delete the files into those folders.??
    thaks

    My comment wasn't directed at you 909592, but to the OP :)
    This question comes up quite a bit here, I just thought it was funny how the question was if it was "possible", not if it "should" be done :)
    Here is a thread that covers it pretty well:
    Can i delete files under $APPLTMP folder in EBS R12.0.4?
    Cheers.

  • Troubleshooting Network Problems Using Log and Trace Files

    Hi,
    can any one tell me how to generate trace and log files related to network errors.

    start with inspecting listener.log
    Post tailend (last 40 lines here) of listener.log

Maybe you are looking for

  • PO report with cost center & GL account detail

    Hi Guy, Any body so kind to help me to find out a standrd SAP report which give the account assingnment detail about PO order line item. The standard SAP report ME2K give the assigned cost center but not about  the assigned GL account. My requirement

  • Can I buy US TV shows on my USA iTunes account while abroad?

    I live in the USA but I am traveling to Mexico in a couple of hours and I was wondering if I can purchase TV episodes of my favorite shows while I am over there? Someone told me I should be able to since I have a US account with a US Credit card. Is

  • Best Practice for Planning and BI

    What's the best practice for Planning and BI infrastructure - set up combined on one box or separate? What are the factors to consider? Thanks in advance..

  • Using TransformGestureEvents in Flash Builder

    Hi all, I  am trying to use the TransformGestureEvents to allow interaction inside  of a FLARE based application. I want to create a data visualisation app  with touch interaction. I have Flash Player 10.1, which  is needed for these classes, as i ha

  • Records Management - automaticaly add element to record

    Hello, I try to add an element to a record using the bapi "bapi_record_addelement", but I get an error-message that the number of poid-parameters is not equal to those in the registry information. My ABAP-Code is the following: *& Report  Z_RECORD_AD