Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stat(2)

tar(1)

mdtar(1)

Name

mdtar − multivolume archiver

Syntax

mdtar [key] [name...]

Description

The mdtar command saves multiple files on  multiple archives (usually an  RX50 diskette, but any file/device may be specified). mdtar actions are controlled by the key argument.  The key is a string of characters containing one function letter and one or more function modifiers.  Other arguments to mdtar are file or directory names specifying which files to dump or restore. In all cases, appearance of a directory name refers to the files and, recursively, subdirectories of that directory. mdtar also saves special files.

Options

−CChanges directory to specified name. This allows multiple directories not related by a close common parent, to be archived using short relative path names.  For example, to archive files from /usr/include and from /etc, one might use

mdtar c −C /usr include . −C /etc .

The function portion of the key is specified by a letter. 

cCreates a new archive.  Writing begins at the beginning of the archive instead of after the last file. 

rWrites the named files to the end of the archive. 

tGenerates archive table of contents.  If no argument is given, all of the names on the archive are listed. 

uUpdates the current archive.  Adds the named files to the archive, if they are not there already or if they have been modified since last put on the archive. 

xExtracts each specified file from the archive.  If the named file matches a directory whose contents had been written onto the archive, this directory is recursively extracted.  The owner, modification time, and mode are restored if you are the superuser and if you have also specified the p switch.  If no file argument is given, the entire content of the archive is extracted.  If multiple entries specifying the same file are on the archive, the last one overwrites previous versions. 

The following characters may be used to qualify the function desired in addition to one or more of the above letters.

0...9Selects unit number of the drive as an alternate disk drive.  The default disk drive is the device named /dev/rra1a.

AUses the specified number (next argument) as archive with which to begin the output.  This switch is intended for error recovery.  mdtar outputs files in terms of Archives. Each Archive contains a number of files. If mdtar has been requested to dump a path (set of files) that consist of (for example) 10 archives and there is an error writing the nth Archive, then the A modifier may be used to restart mdtar at the nth Archive.

CAUTION

You must issue the same path (set of files) as in the first command. This will guarantee that mdtar will begin at the correct file on Archive n.

If the v mode is specified, mdtar outputs informational messages to inform the user of progress. For example, the following command will dump the entire directory structure:

mdtar cv

If an error occurs on Archive 7, to restart at the 7th Archive, without having to re-dump the first 6 Archives, issue the following command:

mdtar cvA 7

mdtar will tell you it is skipping the first 6 Archives and will resume output with the data that begins Archive 7.

bUses the specified number (next argument) as the blocking factor.  The default is 20 (the maximum is 20). 

BForces output blocking to 20 blocks per record. 

fUses the specified file (next argument) as the name of the archive.  If the name of the file is −, mdtar writes to standard output (piping).

F[F]Operates in fast mode.  When F is specified, mdtar skips all SCCS directories, core files, and errs files. When FF is specified, mdtar also skips all a.out and *.o files.

hSaves a copy of the file (excludes symbolic links).  The default action of mdtar is to place symbolic link information on the output device. A copy of the file IS NOT saved on the output device.

iIgnores checksum errors found in the archive. 

lDisplays an error message if all links to the files dumped cannot be resolved. If −l is not specified, no error messages are printed. 

mDoes not restore file modification times.  The modification time is the time of extraction.  Normally, mdtar restores modification times of regular and special files.

oSuppresses the normal directory information.  On output, mdtar normally places information specifying owner and modes of directories in the archive.  Former versions of mdtar, when encountering this information will give the error message

<name>/: cannot create.

pRestores the named files to their original modes, ignoring the present umask(.). Setuid and sticky information will also be restored to the super-user. You must be Superuser to perform this option. For further information, see stat(,), S_ISVTX.

sUses specified number (next argument) as size of media in 512-byte blocks.  This enables mdtar to be used with devices of different physical media sizes. The default is 800 blocks (assumption is an RX50 output Archive).

vDisplays detailed (verbose) information as it archives files.  Normally mdtar does its work silently. With the t function, the verbose option gives more information about the archive entries than just their names. 

#cd
#mdtar cvf mdtar-out vmunix

Produces the output “a vmunix 1490 blocks” where 1490 is the number of 512 byte blocks in the file “vmunix”.

#mdtar xvf mdtar-out

Produces the output “x vmunix, 762880 bytes, 1490 blocks” where 762880 is the number of bytes and 1490 is the number of 512 byte blocks in the file “vmunix” which was extracted.

wDisplays action to be taken for each file and prompts for confirmation.  If a word beginning with ‘y’ is given, the action is done. Any other input means do not do it. 

Restrictions

The u option can be slow. 

The current limit on file name length is 100 characters. 

There is no way to follow symbolic links selectively. 

Diagnostics

Indicates bad key characters and archive read/write errors. 

Indicates if enough memory is not available to hold the link tables. 

Files

/tmp/tar*

See Also

stat(2), tar(1)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026