Thursday, March 17, 2011

Removing the concurrent request and other related log files

Understanding the basic search in Linux

At first we have to know few basic ideas how to search a file in Linux,  then only we can  get the idea how to remove concurrent request log files and other files.

$find                                      --- this is the command to search for files

$find  /etc                               ---this command searching for the mount point “/etc”, it will display all the files under /etc mount point

$ find /etc -name  host*          -- this command will search those files which start with “host” and end with any, and the search  under the /etc folder. We can call this is a search by file name.

$find /etc –iname host*          -- this command would search for the same, but with case no sensitive


Searching old files
Searching old files in linux with a keyword  “-mtime” .

$find /etc –mtime +7  –iname host*       -- now this will search for the file name starts with “host”, and with the condition of last 7 days from this day.

Here “-mtime”, is used to specify the number of days old that the file is. If you enter +5, it will find files older than 5 days, if you enter -5, it will find files which are created 5 days before to till now.


Now we are going to learn how to remove the old files in our log directory of E-Business suite file structure, which always makes trouble for us.

Here we are going to delete those files which are older than 7 days.(Concurrent request files )

 $find $APPLCSF/$APPLLOG -mtime +7 -name “*.req” -exec rm “{}” “;”



Note that $APPLCSF/$APPLLOG is the shortcut for the concurrent log folder, if you are in the same directory then no need of giving the shortcut or the full directory path. And I have deleted “.req” with the file extension, if you want to delete the log files then you have to mention “.log” file. Likewise “.rti”, ”.mgr” and other files we can remove from the concurrent request log folder.

Hope it is useful for ever one.

1 comment:

  1. I appreciate that you share your knowledge point. your information is very valuable. Especially for those we started in the administration of the EBS.

    ReplyDelete