sdar
6-3
The
p
keyletter specifies what operation to execute. It may be any of the
following, but you must specify only one of them:
A number of modifiers (
mod
) may immediately follow the
p
keyletter, to
specify variations on an operation’s behavior:
Table 6.2
sdar p Keyletter Options
Option
Description
d
Deletes modules from the archive. Specify the names of modules to be deleted as
member
...
; the archive is untouched if you specify no files to delete. If you specify the
‘
v
’ modifier,
ar
lists each module as it is deleted.
p
Prints the specified members of the archive, to the standard output file. If the ‘
v
’ modifier
is specified, show the member name before copying its contents to standard output. If
you specify no member arguments, all the files in the archive are printed.
r
Inserts the files member... into archive (with replacement). This operation differs from ‘
q
’
in that any previously existing members are deleted if their names match those being
added. If one of the files named in member... does not exist, ar displays an error
message, and leaves undisturbed any existing members of the archive matching that
name. By default, new members are added at the end of the file; but you may use one
of the modifiers ‘
a
’, ‘
b
’, or ‘
i
’ to request placement relative to some existing member. The
modifier ‘
v
’ used with this operation elicits a line of output for each file inserted, along
with one of the letters ‘
a
’ or ‘
r
’ to indicate whether the file was appended (no old member
deleted) or replaced.
t
Displays a table listing the contents of archive, or those of the files listed in member...
that are present in the archive. Normally only the member name is shown; if you also
want to see the modes (permissions), timestamp, owner, group, and size, you can
request that by also specifying the ‘
v
’ modifier. If you do not specify a member, all files
in the archive are listed. If there is more than one file with the same name (say, ‘
fie
’) in
an archive (say ‘
b.a
’), ‘
ar t b.a fie
’ lists only the first instance; to see them all, you
must ask for a complete listing--in our example, ‘
ar t b.a
’.
x
Extracts members (named member) from the archive. You can use the ‘v’ modifier with
this operation, to request that ar list each name as it extracts it. If you do not specify a
member, all files in the archive are extracted.