Skip to Main Content
Unix in a Nutshell, 4th Edition
book

Unix in a Nutshell, 4th Edition

by Arnold Robbins
October 2005
Intermediate to advanced content levelIntermediate to advanced
908 pages
46h 42m
English
O'Reilly Media, Inc.
Content preview from Unix in a Nutshell, 4th Edition

Name

ar

Synopsis

    ar key [args] [posname] [count] archive[files]

Maintain a group of files that are combined into a file archive. Used most commonly to create and update library files as used by the loader (ld). Only one key letter can be used, but each may be combined with additional args (with no separations between). posname is the name of a file in archive. When moving or replacing files, you can specify that they be placed before or after posname.

On all three systems, key and args can be preceded with a -, as though they were regular options.

Solaris: ar is found in /usr/ccs/bin.

Key

d

Delete files from archive.

m

Move files to end of archive.

p

Print files in archive.

q

Append files to archive.

r

Replace files in archive.

t

List the contents of archive or list the named files.

x

Extract contents from archive or only the named files.

Common Arguments

a

Use with r or m to place files in the archive after posname.

b

Same as a but before posname.

c

Create archive silently.

i

Same as b.

s

Force regeneration of archive symbol table (useful after running strip).

u

Use with r to replace only files that have changed since being put in archive.

v

Verbose; print a description.

Solaris and GNU/Linux Argument

V

Print version number.

Solaris and Mac OS X Argument

T

Truncate long filenames when extracting onto filesystems that don’t support long filenames. Without this operation, extracting files with long filenames is an error.

Solaris ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning the Unix Operating System, 5th Edition

Learning the Unix Operating System, 5th Edition

John Strang, Grace Todino, Jerry Peek
UNIX and Linux System Administration Handbook, 5th Edition

UNIX and Linux System Administration Handbook, 5th Edition

Trent R. Hein, Evi Nemeth, Garth Snyder, Ben Whaley, Dan Mackin

Publisher Resources

ISBN: 0596100299Errata Page