<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: finding out how a tape has been written. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183891#M796243</link>
    <description>This is not a unix standard format. At least *I* don't know it, and tar won't help, not even GNU. Roughly translated:&lt;BR /&gt;&lt;BR /&gt;--8&amp;lt;---&lt;BR /&gt;MEDIA_NO 1&lt;BR /&gt;&lt;BR /&gt;RADAN 1.000000&lt;BR /&gt;&lt;BR /&gt;23583 ring.att&lt;BR /&gt;&lt;BR /&gt;#DAT_LEL:6&lt;BR /&gt;0........&lt;BR /&gt;--&amp;gt;8---&lt;BR /&gt;&lt;BR /&gt;Is this converted from a real tape? Those had a ring in it that you can pull out to make it write protected.&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
    <pubDate>Tue, 10 Feb 2004 09:46:04 GMT</pubDate>
    <dc:creator>H.Merijn Brand (procura</dc:creator>
    <dc:date>2004-02-10T09:46:04Z</dc:date>
    <item>
      <title>finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183872#M796224</link>
      <description>Hi there, can anyone point me in the direction of a utility on HP-UX that determines how a tape is written, i.e. tar,dd or cpio and what the block size is. I worked on ICL's DRS-NX for several years and we had a unix command called "whattape". I have discovered a routine for aix, but need a similar function on HP-UX.&lt;BR /&gt;I was given a tape yesterday that was allegedly a cpio backup from a customer who needed to restore some data, but I was unable to get any meaningful data from it&lt;BR /&gt;thanks in anticipation&lt;BR /&gt;malvin</description>
      <pubDate>Thu, 05 Feb 2004 07:03:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183872#M796224</guid>
      <dc:creator>malvin drakley</dc:creator>
      <dc:date>2004-02-05T07:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183873#M796225</link>
      <description>Hi Malvin&lt;BR /&gt;&lt;BR /&gt;Try Here:-&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=87318" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=87318&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Thu, 05 Feb 2004 07:10:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183873#M796225</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2004-02-05T07:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183874#M796226</link>
      <description>Hi Paula, thanks for the quick reply. I have looked through the thread you have supplied and tried several of the options, but as yet have beeen unable to determine a block size on the cpio tape,&lt;BR /&gt;will keep trying&lt;BR /&gt;malvin</description>
      <pubDate>Thu, 05 Feb 2004 07:43:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183874#M796226</guid>
      <dc:creator>malvin drakley</dc:creator>
      <dc:date>2004-02-05T07:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183875#M796227</link>
      <description>Try:&lt;BR /&gt;# dd if=/dev/rmt/0mn of=/tmp/test bs=1K count=2&lt;BR /&gt;# file /tmp/test&lt;BR /&gt;&lt;BR /&gt;The file command should return what format the tape is (cpio, tar, etc.).</description>
      <pubDate>Thu, 05 Feb 2004 10:22:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183875#M796227</guid>
      <dc:creator>Cheryl Griffin</dc:creator>
      <dc:date>2004-02-05T10:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183876#M796228</link>
      <description>Thanks Cheryl, I have tried that but it still does not let me know what block size the cpio was written with. I tried my tape with and without the -c option and each way that I tried it, it said "perhaps you should try the -c option" or vice versa&lt;BR /&gt;malvin</description>
      <pubDate>Thu, 05 Feb 2004 10:26:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183876#M796228</guid>
      <dc:creator>malvin drakley</dc:creator>
      <dc:date>2004-02-05T10:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183877#M796229</link>
      <description>The file command will only help you confirm that you're working with a cpio tape. &lt;BR /&gt;&lt;BR /&gt;Can pax read the tape?  Pax can read tar and cpio formats.  If pax cant read the tape, it could be that the tape is bad:&lt;BR /&gt;# pax -r -f /dev/rmt/0m&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Feb 2004 10:46:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183877#M796229</guid>
      <dc:creator>Cheryl Griffin</dc:creator>
      <dc:date>2004-02-05T10:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183878#M796230</link>
      <description>Thanks Cheryl, the customer as they say "has just left the building", we are getting a message to him to bring the tape back tomorrow morning, so will let you know the outcome then when I have tried the latest suggestion you have given me&lt;BR /&gt;cheers&lt;BR /&gt;malvin</description>
      <pubDate>Thu, 05 Feb 2004 10:52:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183878#M796230</guid>
      <dc:creator>malvin drakley</dc:creator>
      <dc:date>2004-02-05T10:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183879#M796231</link>
      <description>Unlike mainframes where a tape recognition daemon (they aren't really called that but function that way) is used to ID a tape header, HP-UX doesn't have anything like that. Instead, you can use the guessing program called file. File is a magic program. OK, it uses a file call /etc/magic which is a series of codes to tell file how to match up something at the beginning of a file (or device file) with common formats. So the commands:&lt;BR /&gt; &lt;BR /&gt;mt -t /dev/rmt/0m&lt;BR /&gt;dd if=/dev/rmt/0m of=/var/tmp/tapeid count=2&lt;BR /&gt;file /var/tmp/tapeid&lt;BR /&gt; &lt;BR /&gt;should tell you about the tape, assuming that it is in a 'well-known' format like tar, cpio, etc. (note that /dev/rmt/0m is an example--use the correct device file for your system) It is IMPOSSIBLE to determine if the tape was created with dd since dd is a raw copy of &lt;WHATEVER&gt;. Also, tape formats from mainframes (ie, ANSI or IBM labeled tapes) are not recognized by file. However, you can see if it is a mainframe labeled tape by using xd as in:&lt;BR /&gt; &lt;BR /&gt;mt -t /dev/rmt/0m&lt;BR /&gt;xd -xc /dev/rmt/0m | more&lt;BR /&gt; &lt;BR /&gt;If you see something like VOL as the first 3 characters and subsequent header lines like HDR1, HDR2, etc then you have an ANSI labeled tape. If the characters are strange, it might be in EBCDIC mode so use something like this to translate:&lt;BR /&gt; &lt;BR /&gt;mt -t /dev/rmt/0m&lt;BR /&gt;dd if=/dev/rmt/0m od= count=2 conv=ebcdic | xd -xc&lt;BR /&gt; &lt;BR /&gt;If thisa looks like VOL HDR etc records are present, you have an IBM standard label. The bad news about ANSI or IBM standard laebls is that there is nothing in HP-UX that can read the data and make sense out of it. If the tape contains fixed length records, you can probably play with mt (for positioning the tape) and dd to do a raw copy and translate from EBCDIC if necessary. But if the format is variable length, you'll have to write a program to interpret the records, essentially the basics of a mainframe restore program.&lt;BR /&gt;&lt;/WHATEVER&gt;</description>
      <pubDate>Thu, 05 Feb 2004 11:58:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183879#M796231</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2004-02-05T11:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183880#M796232</link>
      <description>Hi Bill, thanks again for the info, as I said to Cheryl it will be tomorrow before I get another chance to check the tape,&lt;BR /&gt;so will let you know sometime tomorrow&lt;BR /&gt;cheers&lt;BR /&gt;malvin</description>
      <pubDate>Thu, 05 Feb 2004 12:01:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183880#M796232</guid>
      <dc:creator>malvin drakley</dc:creator>
      <dc:date>2004-02-05T12:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183881#M796233</link>
      <description>Hi to Cheryl and Bill, The customer arrived with the tape again yesterday. He says it was written on a SCO box(I've washed my mouth out!). I have tried the "pax" command and the response from that was "this doesn't look like a tar archive, skipping to next file" and then the # prompt.&lt;BR /&gt;I then tried your suggestions Bill and cannot see anything like you suggest, so I have "dd'd" the first 10 blocks in and am attaching them for your perusal. It all looks like plain text so I am not certain as to the kind of tape&lt;BR /&gt;cheers&lt;BR /&gt;malvin</description>
      <pubDate>Tue, 10 Feb 2004 06:26:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183881#M796233</guid>
      <dc:creator>malvin drakley</dc:creator>
      <dc:date>2004-02-10T06:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183882#M796234</link>
      <description>Looks like a tar file to me.&lt;BR /&gt; &lt;BR /&gt;I could also be wrong here but if I remember my SCO (which I probably don't because it was a long time ago) the default block size was 512 when using tar.  So try tar with a block size of 512.</description>
      <pubDate>Tue, 10 Feb 2004 06:33:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183882#M796234</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-02-10T06:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183883#M796235</link>
      <description>actually, if you count the number of chars from the "M" of "MEDIA_NO 1" to the character before the "R" in "RADAN" which I imagine is one block you get 512 so maybe my memory isn't failing after all.</description>
      <pubDate>Tue, 10 Feb 2004 06:38:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183883#M796235</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-02-10T06:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183884#M796236</link>
      <description>Sorry to keep chatting to myself here but I suddenly have a vague memory of a bs of 20 on SCO.  This doesn't make sense but I think the old SCO "tar" was a bit odd (apart from the nice option of taking the rest of it's arguments from a file).</description>
      <pubDate>Tue, 10 Feb 2004 06:43:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183884#M796236</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-02-10T06:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183885#M796237</link>
      <description>Hi Mark thanks for that, what is the syntax for making it read in 512?&lt;BR /&gt;when I used tar -tvf previously it said "tape error"&lt;BR /&gt;cheers&lt;BR /&gt;malvin</description>
      <pubDate>Tue, 10 Feb 2004 06:45:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183885#M796237</guid>
      <dc:creator>malvin drakley</dc:creator>
      <dc:date>2004-02-10T06:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183886#M796238</link>
      <description>malvin, &lt;BR /&gt;&lt;BR /&gt;Looking into tar a bit more, it would seem that  what I said before doesn't mean too much.  The default blocking factor for tar is 20 and tar always writes logical blocks of 512.  It is mentioned that if you are having trouble, use a blocking factor of "1", it is slow but has most chance of success.  In this case you would do&lt;BR /&gt; &lt;BR /&gt;"tar tvbf 1 &lt;DEVICE&gt;", change the "t" to an "x" to actually extract.&lt;BR /&gt; &lt;BR /&gt;However, you do definately have a "tar" file on that tape.&lt;/DEVICE&gt;</description>
      <pubDate>Tue, 10 Feb 2004 07:31:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183886#M796238</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-02-10T07:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183887#M796239</link>
      <description>tape size block can be found by reading ONE block with extreme size:&lt;BR /&gt;&lt;BR /&gt;# dd if=/dev/rmt/0m of=xx ibs=1024000&lt;BR /&gt;# ls -l xx&lt;BR /&gt;&lt;BR /&gt;that's the tape block size (unless it's written on AS4e00, which uses variable block sizes, and you have to write a script that reads those huge blocks from no-rewind device and catenates them to something sane)&lt;BR /&gt;&lt;BR /&gt;# file xx&lt;BR /&gt;&lt;BR /&gt;will give you the file type, but others already said so.&lt;BR /&gt;&lt;BR /&gt;# dd if=xx ibs=512 | tar tvf -&lt;BR /&gt;&lt;BR /&gt;If you do this over a network interface, double buffering might help&lt;BR /&gt;&lt;BR /&gt;# remsh host dd if=/dev/rmt/0m ibs=102400 | dd | dd &amp;gt;xx&lt;BR /&gt;&lt;BR /&gt;A last tip, use GNU tar. It's quite a bit more capable in recovering different tapes and block sizes, and supports command line options to pass any block size you want&lt;BR /&gt;&lt;BR /&gt;GNU tar is also available on my ITRC site:&lt;BR /&gt;Singapore &lt;A href="https://www.beepz.com/personal/merijn/" target="_blank"&gt;https://www.beepz.com/personal/merijn/&lt;/A&gt;&lt;BR /&gt;Rotterdam &lt;A href="http://www.cmve.net/~merijn/" target="_blank"&gt;http://www.cmve.net/~merijn/&lt;/A&gt;&lt;BR /&gt;Seattle   &lt;A href="http://ww.hpux.ws/merijn/" target="_blank"&gt;http://ww.hpux.ws/merijn/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy. Have FUN! H.Merijn</description>
      <pubDate>Tue, 10 Feb 2004 07:44:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183887#M796239</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-02-10T07:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183888#M796240</link>
      <description>Thanks again to both of you, I have tried your suggestions Mark and I get the response "directory checksum error"&lt;BR /&gt;&lt;BR /&gt;Do I call you Mr Procura??&lt;BR /&gt;I have now tried your suggestions and for ls -l xx I get "11958272" and for file x I get "ascii text"&lt;BR /&gt;when I try the next command  I get the same message as above,so will now have to try and use your GNU tar&lt;BR /&gt;&lt;BR /&gt;I'm not giving up yet!!&lt;BR /&gt;malvin</description>
      <pubDate>Tue, 10 Feb 2004 09:15:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183888#M796240</guid>
      <dc:creator>malvin drakley</dc:creator>
      <dc:date>2004-02-10T09:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183889#M796241</link>
      <description>What a _strange_ number. that is 11678k&lt;BR /&gt;Does that ring a bell?&lt;BR /&gt;&lt;BR /&gt;Ahh, no, *I* missed one argument.&lt;BR /&gt;&lt;BR /&gt;# dd if=/dev/rmt/0m of=yy ibs=1024000 count=1&lt;BR /&gt;# ls -l yy&lt;BR /&gt;&lt;BR /&gt;Pfeew, much better.&lt;BR /&gt;&lt;BR /&gt;Could you show us the output of&lt;BR /&gt;&lt;BR /&gt;# od -x xx | head&lt;BR /&gt;&lt;BR /&gt;You can call me Merijn&lt;BR /&gt;&lt;BR /&gt;FWIW, you have just read the complete tape to the file xx, so you can now use that as device :)&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Tue, 10 Feb 2004 09:25:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183889#M796241</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-02-10T09:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183890#M796242</link>
      <description>Hi Merijn, here is the output you have requested,&lt;BR /&gt;malvin</description>
      <pubDate>Tue, 10 Feb 2004 09:36:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183890#M796242</guid>
      <dc:creator>malvin drakley</dc:creator>
      <dc:date>2004-02-10T09:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: finding out how a tape has been written.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183891#M796243</link>
      <description>This is not a unix standard format. At least *I* don't know it, and tar won't help, not even GNU. Roughly translated:&lt;BR /&gt;&lt;BR /&gt;--8&amp;lt;---&lt;BR /&gt;MEDIA_NO 1&lt;BR /&gt;&lt;BR /&gt;RADAN 1.000000&lt;BR /&gt;&lt;BR /&gt;23583 ring.att&lt;BR /&gt;&lt;BR /&gt;#DAT_LEL:6&lt;BR /&gt;0........&lt;BR /&gt;--&amp;gt;8---&lt;BR /&gt;&lt;BR /&gt;Is this converted from a real tape? Those had a ring in it that you can pull out to make it write protected.&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Tue, 10 Feb 2004 09:46:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-out-how-a-tape-has-been-written/m-p/3183891#M796243</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-02-10T09:46:04Z</dc:date>
    </item>
  </channel>
</rss>

