Skip to Content
Mac OS X in a Nutshell
book

Mac OS X in a Nutshell

by Jason McIntosh, Chuck Toporek, Chris Stone
January 2003
Intermediate to advanced
832 pages
32h 40m
English
O'Reilly Media, Inc.
Content preview from Mac OS X in a Nutshell

Name

tar

Synopsis

tar [options] [tarfile] [other-files]

Copy files to or restore files from an archive medium. If any files are directories, tar acts on the entire subtree. Options need not be preceded by - (though they may be). Note that until native drivers for tape drives exist for Mac OS X, tar cannot write to tape. Note also that tar does not preserve resource forks or metadata when copying files that contain them.

Function options

You must use exactly one of these, and it must come before any other options:

-c

Create a new archive.

-r, u

Append other-files to the end of an existing archive.

-t

Print the names of other-files if they are stored on the archive (if other-files are not specified, print names of all files).

x

Extract other-files from an archive (if other-files are not specified, extract all files).

Options

-b

Set block size to 512 bytes.

-e

If there is an error, stop.

-f arch

Store files in or extract files from archive arch. The default is /dev/rst0. Since Mac OS X has no native tape drive support, tar produces an error unless the -f option is used.

-h

Dereference symbolic links.

-m

Do not restore file modification times; update them to the time of extraction.

-O

Create non-POSIX archives.

-o

Do not create archives with directory information that v7 tar would not be able to decode.

-p

Keep ownership of extracted files the same as that of original permissions.

-s regex

Using ed-style regular expressions, change filenames in the archive.

-v

Verbose. Print ...

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

Mac OS X Internals: A Systems Approach

Mac OS X Internals: A Systems Approach

Amit Singh
C++ In a Nutshell

C++ In a Nutshell

Ray Lischner
Linux Shell Scripting Cookbook - Third Edition

Linux Shell Scripting Cookbook - Third Edition

Clif Flynt, Sarath Lakshman, Shantanu Tushar
Optimized C++

Optimized C++

Kurt Guntheroth

Publisher Resources

ISBN: 0596003706Supplemental ContentCatalog PageErrata