find . -name '*.req' -mtime +2 -exec rm {} \; not deleting files

i want to remove *.req files from directory
/opt/FFCL8001/oracle/inst/apps/FFCL8001_lhrho/logs/appl/conc/log

i executed command find . -name '*.req' -mtime +2 -exec rm {} \;

but it is running since hours and free space in /opt is same as old 7.4 GB .

why it is not removing files ?

First run below command and see if the files are getting listed:-

find /opt/FFCL8001/oracle/inst/apps/FFCL8001_lhrho/logs/appl/conc/log -name "*.req" -mtime +2 -exec ls -l {} \;

If yes, then retry:-

find /opt/FFCL8001/oracle/inst/apps/FFCL8001_lhrho/logs/appl/conc/log -name "*.req" -mtime +2 -exec rm -f {} \;

Note: It is also possible that the directory which you mentioned above is not on the same file system as /opt/ . It can be a symbolic link pointing to a different file system. Please recheck.

find /opt/FFCL8001/oracle/inst/apps/FFCL8001_lhrho/logs/appl/conc/log -name "*.req" -mtime +2 -exec ls -l {} \;

above command is running from many minutes it did not show any output

now after a long time it is showing output.

recently more than one hour i am getting these kind of messages displayed on screen :

find: /opt/FFCL8001/oracle/inst/apps/FFCL8001_lhrho/logs/appl/conc/log/l70747651.req: No such file or directory

You can automate task so Oracle database automatically delete log files

Removing Log Files

with cron jobs we ccan automate removal of these files ?

but currently im in a tension because these files are not removed.

Hey rehantayyab82,

If the find takes a long time just to show files, my guess is that you directory is big.

There may be a race condition as well. Some file looks like they disappear between the time they're detected by find and deleted by rm (so the warning).

How big is a req file on average. Maybe you cannot expect your operation to free much space.

Good luck
Santiago