DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(tar) files

Info Catalog (tar) Selecting Archive Members (tar) Choosing (tar) exclude
 
 Reading Names from a File
 =========================
 
      _(This message will disappear, once this node revised.)_
 
    Instead of giving the names of files or archive members on the
 command line, you can put the names into a file, and then use the
 `--files-from=FILE-OF-NAMES' (`-T FILE-OF-NAMES') option to `tar'.
 Give the name of the file which contains the list of files to include
 as the argument to `--files-from'.  In the list, the file names should
 be separated by newlines.  You will frequently use this option when you
 have generated the list of files to archive with the `find' utility.
 
 `--files-from=FILE NAME'
 `-T FILE NAME'
      Get names to extract or create from file FILE NAME.
 
    If you give a single dash as a file name for `--files-from', (i.e.,
 you specify either `--files-from=-' or `-T -'), then the file names are
 read from standard input.
 
    Unless you are running `tar' with `--create', you can not use both
 `--files-from=-' and `--file=-' (`-f -') in the same command.
 
    The following example shows how to use `find' to generate a list of
 files smaller than 400K in length and put that list into a file called
 `small-files'.  You can then use the `-T' option to `tar' to specify
 the files from that file, `small-files', to create the archive
 `little.tgz'.  (The `-z' option to `tar' compresses the archive with
 `gzip';  gzip for more information.)
 
      $ find . -size -400 -print > small-files
      $ tar -c -v -z -T small-files -f little.tgz
 

Menu

 
* nul
 
Info Catalog (tar) Selecting Archive Members (tar) Choosing (tar) exclude
automatically generated byinfo2html