When a tar tape is written with the -N flag, it must be read with that same flag. I've seen it where if you leave it off, you'll get I/O errors and also seen it where the tape will read 'till the end of the tape, but retrieve no files and if -v was specified, produce no output. If you have a tape that you don't know the block size, you can use these commands to figure out what to use. To determine the current block size on the tape drive, lsattr -l rmt0 -E If it's not block_size=0, then to change it, chdev -l rmt0 -a block_size=0 To determine the block size a tape was written at, use either dd if=/dev/rmt0 bs=156k count=1 | wc -c (best) or if the tape is real small, tcopy /dev/rmt0 The problem with tcopy is, it will read the whole tape before printing out even 1 line. It tries to summarize things, i.e. tcopy: Tape File: 1; Records: 1 to 447; Size: 32768. tcopy: File: 1; End of File after: 447 Records, 14647296 Bytes. read: There is an input or output error. (This always is shown at EOT) tcopy: The end of the tape is reached. tcopy: The total tape length is 14647296 bytes. (which yes, is 447*32768) The answer (eg 10240) will be used in the tar command, tar xvN 10240 (On 6-11-2004, the US Applications tape was 32768, which helped us overcome these bizarre error messages on a simple tar tv command, tar: 0511-193 An error occurred while reading from the media. There is not enough memory available now. tar tvN 32768 worked fine. ... Well, it worked for root, but still failed for inst1 'till I changed inst1's stanza in /etc/security/limits, changing data=491519 to data=-1. Interesting.) ------------------------------------------------------------------------- To tar a bunch of files (example from /local/lib/afs/maketar), cd /afs/.almaden.ibm.com/rs_aix41/usr/afsws/root.client /bin/tar -cvdf $dest/afsclient-41.tar ./var/vice ./.package ./etc/* or cd /local/lib/alminst/scripts /bin/tar -cvdf /dev/fd0 setup* or if you want it compressed as well (uncompress with zcat), tar cvf - /local/bin /etc/socks.conf | compress > local.tar.Z ------------------------------------------------------------------------- To untar it (corresponding example from /local/lib/afs/afsinstall), tar -xvf /local/lib/afs/afsclient-41.tar or tar -xvf /dev/fd0 or tar -xvpf /dev/rmt0 (The p preserves the protection bits, and is needed e.g. for /var/spool/mail.) ------------------------------------------------------------------------- To just view it first, tar -tvf /local/lib/afs/afsclient-41.tar ------------------------------------------------------------------------- To view a tar'd & compressed file ( e.g. fixdist comes that way), zcat fd.tar.Z | tar -tvf - and of course, to untar it, zcat fd.tar.Z | tar -xvf - ------------------------------------------------------------------------- This was found in a README file in my home directory, probably from when I got gzip from GNU (I'm guessing). Because the `compress' utility is covered by patents (US 4,464,650 and 4,558,302), we cannot use it; it is not free software. Instead, the GNU Project uses the `gzip' program, which is free of known software patents and also compresses better than `compress'. Files compressed with this method end with `.gz'. Gzip can also uncompress files compressed with `compress' (i.e. files ending in `.Z'), since the uncompression algorithm is not patented. To extract sources that are in files ending in `.tar.gz' you can use the command gzip -d < foo.tar.gz | tar xf - or tf - to just view them. ------------------------------------------------------------------------- I found this in http://sunsite.doc.ic.ac.uk/public/pub/public/packages/perl5/ENDINGS when I was picking up the latest Perl code. Kind of a handy summary ... .tar Tape ARchive (never mind the 'tape' part, historical reasons, disk will do just fine). Program called "tar" will help, "tar tvf foo.tar" will list the contents, "tar xvf foo.tar" will extract the contents. .Z compressed with "compress", "uncompress" to uncompress .gz compressed with "gzip", "gunzip" (or "gzip -d") to uncompress .uu UUencoded with "uuencode", "uudecode" to decode (note: the first line of the .uu file tells the name of the un-uuencoded file that will appear when you uudecode) .shar SHell ARchive: can be extracted in UNIX either with "unshar -c" or "unshar" or "sh". .zip PCish archive, "unzip -l foo.zip" to list the contents, "unzip -x foo.zip" to extract, "unzip -h" for help. .bin MacIntoshish archive, StuffIt should work. In UNIX a program called "mcvert" should work. .sit MacIntoshish archive, StuffIt should work. In UNIX a program called "unsit" should work. .hqx MacIntoshish archive, StuffIt should work. .zoo Amigaish/Atarish archive, zoo should work. .tgZ .tar.Z in disguise for DOS, see below for "MULTIPLE ENDINGS" .tgz .tar.gz ditto, ditto .taz .tar.gz ditto, ditto Code and/or Documentation .pl PerL: perl script, any Perl version .pm Perl Module: Perl 5 onwards code .pod Plain Old Documentation: perl documentation, quite readable as-is but if needed converters like pod2man, pod2html, exist in the Perl 5 distribution (CPAN/src/5.0/) .xs Perl eXtenSion code, please see the perlxs documentation coming with the Perl 5 distribution .man UNIX man(1) manual page format (nroff) .1 ditto .html HyperText Markup Language: the Web-speak .tex TeX or LaTeX formatted text .txt Text Graphics .xbm X11 BitMap, view with e.g. "xv" .gif Graphics Interchange Format, view with e.g. "xv" .ps PostScript: you probably have a laser printer that groks this and possibly have a previewer like ghostscript ("gs") that will display this on a screen .dvi DeVice Independent: TeX portable graphics display format: converters like "dvips" (DVI -> PostScript) and previewers like "xdvi" (X Window DVI) exist.