GNU Info

Info Node: (tar.info)prepare for examples

(tar.info)prepare for examples


Next: Creating the archive Up: create
Enter node , (file) or (file)node

Preparing a Practice Directory for Examples
-------------------------------------------

   To follow along with this and future examples, create a new directory
called `practice' containing files called `blues', `folk' and `jazz'.
The files can contain any information you like: ideally, they should
contain information which relates to their names, and be of different
lengths.  Our examples assume that `practice' is a subdirectory of your
home directory.

   Now `cd' to the directory named `practice'; `practice' is now your
"working directory".  (_Please note_: Although the full path name of
this directory is `/HOMEDIR/practice', in our examples we will refer to
this directory as `practice'; the HOMEDIR is presumed.

   In general, you should check that the files to be archived exist
where you think they do (in the working directory) by running `ls'.
Because you just created the directory and the files and have changed to
that directory, you probably don't need to do that this time.

   It is very important to make sure there isn't already a file in the
working directory with the archive name you intend to use (in this case,
`collection.tar'), or that you don't care about its contents.  Whenever
you use `create', `tar' will erase the current contents of the file
named by `--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME') if it exists.  `tar'
will not tell you if you are about to overwrite an archive unless you
specify an option which does this.  To add files to an existing
archive, you need to use a different option, such as `--append' (`-r');
see Note: append for information on how to do this.


automatically generated by info2www version 1.2.2.9