DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(tar.info.gz) extract dir

Info Catalog (tar.info.gz) extracting files (tar.info.gz) extract (tar.info.gz) failing commands
 
 Extracting Files that are Directories
 -------------------------------------
 
    Extracting directories which are members of an archive is similar to
 extracting other files.  The main difference to be aware of is that if
 the extracted directory has the same name as any directory already in
 the working directory, then files in the extracted directory will be
 placed into the directory of the same name.  Likewise, if there are
 files in the pre-existing directory with the same names as the members
 which you extract, the files from the extracted archive will replace
 the files already in the working directory (and possible
 subdirectories).  This will happen regardless of whether or not the
 files in the working directory were more recent than those extracted.
 
    However, if a file was stored with a directory name as part of its
 file name, and that directory does not exist under the working
 directory when the file is extracted, `tar' will create the directory.
 
    We can demonstrate how to use `--extract' to extract a directory
 file with an example.  Change to the `practice' directory if you
 weren't there, and remove the files `folk' and `jazz'.  Then, go back
 to the parent directory and extract the archive `music.tar'.  You may
 either extract the entire archive, or you may extract only the files
 you just deleted.  To extract the entire archive, don't give any file
 names as arguments after the archive name `music.tar'.  To extract only
 the files you deleted, use the following command:
 
      $ tar -xvf music.tar practice/folk practice/jazz
 
 Because you created the directory with `practice' as part of the file
 names of each of the files by archiving the `practice' directory as
 `practice', you must give `practice' as part of the file names when you
 extract those files from the archive.
 
Info Catalog (tar.info.gz) extracting files (tar.info.gz) extract (tar.info.gz) failing commands
automatically generated byinfo2html