Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

core file deletion script problem

619823Aug 4 2009 — edited Aug 11 2009
hi all .. i wrote a script to delete core files from directory /u01, automatically when it id filled more than 65 %. To test it i have set the crontab to every one minute. Its not executing. please have a look on following and tell me where i am committing mistake?

-bash-3.00$ df -ah
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d4 28G 22G 5.7G 80% /u01


-bash-3.00$ crontab -l
01 * * * * . /export/home/oracle/remove_core.sh


-bash-3.00$ more remove_core.sh
cd /u01/app/oracle/diag/rdbms/grid3/grid31/cdump
a='df -h .|grep %|cut -c55-56'
if $a -gt 65 this is properly enclosed in square brackets
then
rm -rf *;
touch kashif.txt
fi



-bash-3.00$ crontab -e remove_core.sh
crontab: you are not a valid user (no entry in /etc/passwd).i did this all using root as well but in vein

thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 8 2009
Added on Aug 4 2009
5 comments
3,183 views