Some Linux commands I use often

Get the total size of some files:

du -ch /path/patern* | grep total

Get the total number of files being backed up using the log of the RMAN job:

grep -i 'input datafile file number=' rman_BKUP.log | wc -l

Use grep to display the next 2 lines after the pattern you’re looking for (-A= AFTER , B=BEFORE):

grep -i -A 2 'input datafile file number'  rman_BKUP.log
input datafile file number=00001 name=/storage/datafile.dbf
channel ch02: starting piece 1 at 14-MAR-18 15:30:25
channel ch01: finished piece 1 at 14-MAR-18 15:30:32

Leave Comment

Your email address will not be published. Required fields are marked *