Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Sep 2000 23:33:08 -0700
From:      "Crist J . Clark" <cjclark@reflexnet.net>
To:        igorr@crosswinds.net
Cc:        FreeBSD questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: GNU tar on FreeBSD
Message-ID:  <20000919233308.R367@149.211.6.64.reflexcom.com>
In-Reply-To: <20000920100425.A14928@linux.rainbow>; from igor@raduga.dyndns.org on Wed, Sep 20, 2000 at 10:04:25AM %2B0400
References:  <20000920080632.A11387@linux.rainbow> <20000919224231.P367@149.211.6.64.reflexcom.com> <20000920100425.A14928@linux.rainbow>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 20, 2000 at 10:04:25AM +0400, Igor Roboul wrote:
> On Tue, Sep 19, 2000 at 10:42:31PM -0700, Crist J . Clark wrote:
> > 
> > Because on every tar(1) I have ever used has the 't' option do what
> > you ask. Again, 't' not 'T.' You coulda RTFM.
> I'm talking about GNU tar which is used with FeeBSD. From man page:
>  -T file
>  --files-from file       Get names of files to extract or create from
>                          file, one per line.
> 
>  -t
>  --list         List the contents of an archive; if filename arguments are
>                     given, only those files are listed, otherwise the entire
>                     table of contents is listed.
> 
> I wish _ADD_ files with specified names to archive and not _SHOW_ content of
> archive :-)

Oh, misunderstood the first message. Your problem was your command
line syntax. For example, here are two tar(1) attempts on my system,

  [201:~] find . -name 'z*' -print | tar -cz -T - -f test_tar.tgz
  [202:~] find . -name 'z*' -print | tar cz -T - -f test_tar.tgz
  tar: can't add file -T : No such file or directory
  tar: can't add file - : No such file or directory
  tar: can't add file -f : No such file or directory
  tar: can't open archive /dev/rsa0 : Permission denied
  Broken pipe
  [203:~]

Note the subtle difference in the command line syntax between the
two. The first works fine,

  [203:~] tar tzf test_tar.tgz 
  ./Office51/bookmark/Information/zdnet.url
  ./Office51/bookmark/Information/zip-code.url

This works fine too,

  [207:~] rm test_tar.tgz
  [208:~] find . -name 'z*' -print | tar czTf - test_tar.tgz
  [209:~] tar tzf test_tar.tgz
  ./Office51/bookmark/Information/zdnet.url
  ./Office51/bookmark/Information/zip-code.url
  [210:~] 

You cannot mix the "dashless" syntax with dashed options willy-nilly.
-- 
Crist J. Clark                           cjclark@alum.mit.edu


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000919233308.R367>