View Single Post
  #4  
Old November 7th 05, 04:41 PM
Steve Cousins
external usenet poster
 
Posts: n/a
Default Tape Scanning in Linux

2hawks wrote:

nice... thanks for that. That solves the cpio end of things for me I
guess. Now I wonder if that would work the same with tar.... or other
methods of writing to tape. Trick for me would be to develop a script
that just looked at the tape and did and ls of it... not dependent on
cpio or anything.


cpio will work with tar too. To check for what type of file is on the
tape you could try putting something like this in your script:

FILE_TYPE=`dd if=/dev/tape bs=32k count=1 | file -`

and then figure out what to do based on what is in the FILE_TYPE variable.

Have fun.

Steve