From owner-freebsd-questions Tue Sep 19 23:34: 8 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mailhost01.reflexnet.net (mailhost01.reflexnet.net [64.6.192.82]) by hub.freebsd.org (Postfix) with ESMTP id 3EB9E37B422 for ; Tue, 19 Sep 2000 23:34:06 -0700 (PDT) Received: from 149.211.6.64.reflexcom.com ([64.6.211.149]) by mailhost01.reflexnet.net with Microsoft SMTPSVC(5.5.1877.197.19); Tue, 19 Sep 2000 23:32:08 -0700 Received: (from cjc@localhost) by 149.211.6.64.reflexcom.com (8.11.0/8.11.0) id e8K6X9k18375; Tue, 19 Sep 2000 23:33:09 -0700 (PDT) (envelope-from cjc) Date: Tue, 19 Sep 2000 23:33:08 -0700 From: "Crist J . Clark" To: igorr@crosswinds.net Cc: FreeBSD questions Subject: Re: GNU tar on FreeBSD Message-ID: <20000919233308.R367@149.211.6.64.reflexcom.com> Reply-To: cjclark@alum.mit.edu References: <20000920080632.A11387@linux.rainbow> <20000919224231.P367@149.211.6.64.reflexcom.com> <20000920100425.A14928@linux.rainbow> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20000920100425.A14928@linux.rainbow>; from igor@raduga.dyndns.org on Wed, Sep 20, 2000 at 10:04:25AM +0400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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