I need to create a script for Unix but I have no idea about scripting language, so I need a lot of help.
We have an Oracle database that generates archivelog files in folder /oracle/arch. This files have name arch_nnnnnn.dbf where nnnnnn is a consecutive number (i.e.: arch_435623.dbf). When this folder is 80% full we move first 100 files to folder /temp/arch, but we must first delete first 100 files of folder /temp/arch to have enough space for the new files.
I need a script that checks when folder /oracle/arch is full at 80% (it's mounted on a filesystem, so I check it manually using bdf command) and then makes these movings:
- delete first 100 files of folder /temp/arch
- move first 100 files from /oracle/arch to /temp/arch
Can you help me with this script?
Thank you very much
We have an Oracle database that generates archivelog files in folder /oracle/arch. This files have name arch_nnnnnn.dbf where nnnnnn is a consecutive number (i.e.: arch_435623.dbf). When this folder is 80% full we move first 100 files to folder /temp/arch, but we must first delete first 100 files of folder /temp/arch to have enough space for the new files.
I need a script that checks when folder /oracle/arch is full at 80% (it's mounted on a filesystem, so I check it manually using bdf command) and then makes these movings:
- delete first 100 files of folder /temp/arch
- move first 100 files from /oracle/arch to /temp/arch
Can you help me with this script?
Thank you very much