afio - manipulate archives and files
afio -o [ options ] archive
afio -t [ options ] archive
afio -i [ options ] archive
afio -p [ options ] directory [ ... ]
Afio manipulates groups of files, copying them within the (collective) filesystem or
between the filesystem and an afio archive. Note that afio archives are portable, as they
contain only ASCII-formatted header information. They are also compatible with ASCII
cpio(1) archives (ala cpio -c).
With -o, reads pathnames from the standard input and writes an archive.
With -t, reads an archive and writes a table-of-contents to the standard output.
With -i, installs the contents of an archive relative to the working directory.
With -p, reads pathnames from the standard input and copies the files to each directory.
Creates missing directories as necessary, with permissions to match their parents.
Generates sparse filesystem blocks (with lseek(2)) when possible.
Supports multi-volume archives during interactive operation (i.e., when /dev/tty is acces-
sible and SIGINT is not being ignored).
-b size Read or write size-character archive blocks. Suffices of b, k and m denote
multiples of 512, 1024 and 1048576, respectively. Defaults to 5120 for com-
patibility with cpio(1).
-c count Buffer count archive blocks between I/O operations. A large count is recom-
mended with streaming magnetic tape drives.
-d Don't create missing directories.
-e bound Pad the archive to a multiple of bound characters. Recognizes the same suf-
fices as -s. Defaults to 1x (the -b block size) for compatibility with
-f Spawn a child process to actually write to the archive; provides a clumsy
form of double-buffering. Requires -s for multi-volume archive support.
-g Change to input file directories. Avoids quadratic filesystem behavior with
long similar pathnames. Requires all absolute pathnames, including those for
the -o archive and the -p directories.
-h Follow symbolic links, treating them as ordinary files and directories.
-j Don't generate sparse filesystem blocks.
-k Skip corrupt data at the beginning of an archive (rather than complaining
about unrecognizable input).
-l With -o, write file contents with each hard link.
With -t, report hard links.
With -p, attempt to link files rather than copying them.
-m Mark output files with a common current timestamp (rather than with input
file modification times).
-n Protect newer existing files (comparing file modification times).
-s limit Restrict each portion of a multi-volume archive to limit characters. Recog-
nizes the same suffices as -b. Also, the suffix x denotes a multiple of the
-b block size (and must follow any -b specification). Useful with finite-
length devices which do not return short counts at end of media (sigh); out-
put to magnetic tape typically falls into this category.
-u Report files with unseen links.
-v Verbose. Report pathnames as they are processed. With -t, gives an ls -l
style report (including link information).
-x Retain file ownership and setuid/setgid permissions. This is the default for
the super-user; he may use -X to override it.
-y prefix Restrict archive processing to names beginning with prefix. Specify once for
each prefix to be recognized. Use -Y to supply prefixes which are not to be
-z Print execution statistics. This is meant for human consumption; use by other
programs is officially discouraged.
Special-case archive names:
o Specify - to read or write the standard input or output, respectively. This dis-
ables multi-volume archive handling.
o Prefix a command string to be executed with an exclamation mark (!). The command is
executed once for each archive volume, with its standard input or output piped to
afio. It is expected to produce a zero exit code when all is well.
o Use system:file to access an archive in file on system. This is really just a spe-
cial case of pipelining. It requires a 4.2BSD-style remote shell (rsh(1C)) and a
remote copy of afio.
o Anything else specifies a local file or device. An output file will be created if
it does not already exist.
Recognizes obsolete binary cpio(1) archives (including those from machines with reversed
byte order), but cannot write them.
Recovers from archive corruption by searching for a valid magic number. This is rather
simplistic, but, much like a disassembler, almost always works.
Optimizes pathnames with respect to the current and parent directories. For example,
./src/sh/../misc/afio.c becomes src/misc/afio.c.
There are too many options.
Restricts pathnames to 1023 characters and 255 meaningful elements.
There is no sequence information within multi-volume archives. Input sequence errors gen-
erally masquerade as data corruption. A solution would probably be mutually exclusive
with cpio(1) compatibility.
Degenerate uses of symbolic links are mangled by pathname optimization. For example,
assuming that "usr.src" is a symbolic link to "/usr/src", the pathname "usr.src/../bin/cu"
is mis-optimized into "bin/cu" (rather than "/usr/bin/cu").
cpio(1), find(1), tar(1), tp(1).