Find files on tape from SAMFS (ASM) log file

save as samffot and changemod to 755. Edit archiver log location to suit your system

#!/bin/sh
#: john core 03-01-2007
## samffot – samfs find file on tape
####################################
if [ "$1" = "" ]
then
echo "usage: $0 filename"
exit
fi
DEV=`grep $1 /var/adm/archiver.log|tail -1|awk ‘{print $4}’`
TAPE=`grep $1 /var/adm/archiver.log|tail -1|awk ‘{print $5}’`
POS=`grep $1 /var/adm/archiver.log|tail -1|awk ‘{print $9}’|cut -f1 -d ‘.’`
echo "dev=${DEV} tape=${TAPE} pos=${POS}"

exit

Leave a Reply

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