Monday, January 7, 2013

Useful Linux Commands For DBA

Show Routing Table :
 
netstat -r

Check ORA errors in the Logs:

grep ^ORA- *log |cut -f2 -d"-"|cut -f1 -d:|awk '{print "ORA-" $1}'|sort -u
Inzip CPIO Files :
 
cpio -idmv < 
 Sort Files By Size :
ls -l |sort -k 5

Find Command archive and move to another Folder :
find ./ -name "*.arch" -mtime +1 -exec mv {} /u01/;
Find Command archive and Remove it:
find ./ -name "*.ARC" -mtime +1 -exec rm {} \;
Find Command with Zip :
find ./ -name "*.ARC" -mtime +1 -exec gzip {} \;
 Find Command With List :

 find ./ -name "*.ARC" -mtime +1 -ls 



Thank you
Osama Mustafa



2 comments: