Go to the previous, next section.

Tutorial Introduction to tar

This chapter guides you through some basic examples of tar operations. If you already know how to use some other version of tar, then you probably don't need to read this chapter. This chapter omits complicated details about many of the ways tar works. See later chapters for full information.

Before proceeding further with this tutorial chapter, be sure you understand already and clearly what is meant by "archive" and "archive member".

FIXME: xref What tar Does
.

This chapter guides you through some basic examples of tar operations. In the examples, the lines you should type are preceded by a `%', which is a typical shell prompt. We use mnemonic forms of operations and options in the examples, and in discussions in the text, but short forms produce the same result.

Most of the options to tar come in both long forms and short forms. The options described in this tutorial have the following abbreviations (except `--delete', which has no shorthand form):

`--create'
`-c'
`--list'
`-t'
`--extract'
`-x'
`--append'
`-r'
`--verbose'
`-v'
`--file=archive-name'
`-f archive-name'

These options make typing long tar commands easier. For example, instead of typing

tar --create --file=/tmp/afiles.tar --verbose apple angst asparagus
you can type
tar -c -f /tmp/afiles.tar -v apple angst asparagus

For more information on option syntax,

FIXME: ref Invoking tar
. In discussions in the text, when we present some mnemonic option, we also give the corresponding short option within parentheses.

Go to the previous, next section.