Re: Getting a TOC from an existing tape?
On Thu, 30 Aug 2001 at 10:40am, Paul Lussier wrote > I just checked the FAQ-O-Matic and docs/, but couldn't find this answer. > (btw, looks like that fom needs some clean-up, there are a bunch of > empty "New Item" items in there). > > I have a tape, and want to find out what's on it directly from > the tape. I know I've seen this answered some where before, but > can't seem to remember wherer. > amrestore /dev/nst0 no-such-host -- Joshua Baker-LePain Department of Biomedical Engineering Duke University
Re: Getting a TOC from an existing tape?
On Thu, 30 Aug 2001, Paul Lussier wrote: > I just checked the FAQ-O-Matic and docs/, but couldn't find this answer. > (btw, looks like that fom needs some clean-up, there are a bunch of > empty "New Item" items in there). Yes, it's getting to be a bit of a mess. > I have a tape, and want to find out what's on it directly from > the tape. I know I've seen this answered some where before, but > can't seem to remember wherer. If my somewhat fuzzy memory serves, the trick is to run amrestore and specify a phoney host/disk name combination. Then it will scan the tape looking for the filesystem you asked for, printing out those it does find along the way. Since the phoney fs won't be found it will scan all the way to the end of the tape, and voila, you have a tape listing. I suppose some enterprising soul could turn this into a real command, or command option. It probably hasn't been done because it works well enough to satisfy most folks like this. The big problem with this is only that it continues to be a FAQ due to its general obscurity. -Mitch
Getting a TOC from an existing tape?
Hi all, I just checked the FAQ-O-Matic and docs/, but couldn't find this answer. (btw, looks like that fom needs some clean-up, there are a bunch of empty "New Item" items in there). I have a tape, and want to find out what's on it directly from the tape. I know I've seen this answered some where before, but can't seem to remember wherer. Thanks, -- Seeya, Paul ...we don't need to be perfect to be the best around, and we never stop trying to be better. Tom Clancy, The Bear and The Dragon If you're not having fun, you're not doing it right!
Re: Getting a TOC from an existing tape?
Paul Lussier <[EMAIL PROTECTED]> wrote: > I have a tape, and want to find out what's on it directly from > the tape. I know I've seen this answered some where before, but > can't seem to remember wherer. #! /bin/sh TAPE=/dev/nst0 COUNT=1 mt -f $TAPE rewind && dd if=$TAPE bs=32k count=1 2>/dev/null | (head -1; cat > /dev/null) && while mt -f $TAPE fsf 1 ; do if [ $# = 0 ]; then echo -n "FILE $COUNT " else echo -n "FILE $COUNT (real: `mt -f /dev/nst0 status | awk '/^file number/ { print $NF; }'`) " fi dd if=$TAPE bs=32k count=1 2>/dev/null | (head -1; cat > /dev/null) COUNT=`expr $COUNT + 1` done
Re: Getting a TOC from an existing tape?
On 30 Aug 2001 10:40:46 -0400, Paul Lussier wrote: > I have a tape, and want to find out what's on it directly from > the tape. I know I've seen this answered some where before, but > can't seem to remember wherer. Take a look at amtoc, which will create a TOC from logfiles. ./Ben > Thanks, > > > -- > > Seeya, > Paul