head 1.1; access; symbols; locks; strict; comment @# @; 1.1 date 2019.08.01.21.51.06; author wkt; state Exp; branches; next ; desc @@ 1.1 log @Initial revision @ text @.TH itp 1L "Mar 1995" .SH NAME itp \- extract/list the contents of a Unix itp archive .SH SYNOPSIS .B itp [ .B t|x ] .I filename .SH DESCRIPTION .B itp takes the filename of a Unix itp archive as its second argument, and either lists the contents of the archive, or extracts the contents of the archive to the current directory. The first argument is either a .B t or an .B x. .SH OPTIONS .TP .B t Produce a table of contents. .TP .B x Extract the archive's contents to the current directory. .SH ARCHIVE FORMAT A .I itp archive is broken up into a number of 512-byte blocks. Block 0 begins the archive's table of contents. The table of contents is made up of a number of records with the following C structure: .PP .nf /* itp tape directory entry */ struct tpdir { char pathname[48]; /* Filename of file */ uint16_t mode; /* Unix mode */ uint8_t uid; /* Owner of file */ uint8_t gid; /* Group of file */ char unused1; uint8_t size[3]; /* Size in bytes */ uint32_t modtime; /* Time of last modification */ uint16_t tapeaddr; /* Beginning block on tape */ uint16_t checksum; /* Checksum */ }; .fi .PP where .I uintXX_t indicates an unsigned integer .I XX bits wide. .PP The last record in the table of contents has a 0 in the first byte of the .I pathname string. All blocks following this block contain the files in the archive. The .I tapeaddr field in each file entry points to the first block which contains the data for that file. Files are stored contiguously. Where a file is not a multiple of the block-size in size, it is padded with bytes so that it is a integral number of blocks. .SH BUGS .B itp does not use the .I checksum field in the table of contents records. .PP .I mkdir -p is used to recursively make directory hierachies if they are needed. .SH "SEE ALSO" .BR tap (1L), .BR tp (1L), .BR itp (1L), .BR mkdir (1) .SH AUTHOR Warren Toomey wkt@@cs.adfa.edu.au @