Tuesday, April 29, 2008

Find Command......

Most case we come across Arch space full. In multiple if Database and multiple folders on same mount point, getting in to each folder and zipping is time consuming. Find the find command, very helpful in this case.

find <Mount Point> -name <filename.extension> -exec <operaton>;

Few examples.

find /mounts/arch/* -name “*.arc” –exec /user/bin/gzip {} \;

Above script will find all .arc files in the specified mount files and zip all the files.

find /mounts/arch/* -name “*.arc” –mtime +7 –exec /user/bin/gzip {} \;

This scrip will find the find and zip .arc files older than 7 days.

find /mount/arch/* -name “*.arc” –mtime +7 –exec rm {} \;

This scrip will find the find and removes .arc files older than 7 days

Hence can modified .. the way we want........ depending the context.....

My Blog.. My .. Oracle.......

welcome you all ... to the world of Oracle...... This blog will run through some .. good implementations... in ORACLE..... mostly mine..........

This is mostly our blog more then mine....... suggestions and corrections .. always welcome.... you can reach me any time at snsivaprasad@gmail.com or sivaprasad.sn@gmail.com