Sun Microsystems 2.1 Server User Manual


 
Chapter 5 Sun MediaCenter Server Utilities 5-17
5.4 The smc_ls Utility
The smc_ls utility lists the titles available for playback on a Sun MediaCenter
server. You can play these titles through the facilities of the Media Stream Manager.
To run smc_ls remotely, you need only the smc_ls binary, which you can copy
from /opt/SUNWsms/bin on a Sun MediaCenter server with the current release of
software. smc_ls has the following syntax:
...where server is the default server used for specifying one or more title arguments.
If you do not specify the -s server option, localhost is the default.
You specify title arguments in the form server:pattern, where pattern is a restricted
regular expression that follows the rules for shell filename matching. If server is not
specified in title, the default server (as specified by the -s option or localhost) is
used for that pattern. If pattern is not specified, all of the titles on the specified server
are listed.
echo "Restore it? (yes or no) \c"
read response < /dev/tty
if [ $response = "yes" ]; then
found=true
echo "Load tape dated $date and hit return when done \c"
read response < /dev/tty
if mt -f ${inputDevice} rew && mt -f ${inputDevice}n fsf $((fileNumber -
1)); then
if smc_tar xf $inputDevice $t; then
echo "$t restored"
fi
fi
fi
done
if [ "$found" = "false" ]; then
echo "The title you requested was not found on any backup tape"
fi
done
smc_ls [-s server] [-bBdDFhlnNrSUvwX] [title...]