From owner-freebsd-bugs Wed Sep 26 13:40:14 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B413137B507 for ; Wed, 26 Sep 2001 13:40:00 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8QKe0d10396; Wed, 26 Sep 2001 13:40:00 -0700 (PDT) (envelope-from gnats) Received: from nollie.summersault.com (nollie.summersault.com [208.10.44.140]) by hub.freebsd.org (Postfix) with SMTP id B925F37B420 for ; Wed, 26 Sep 2001 13:30:41 -0700 (PDT) Received: (qmail 66437 invoked by uid 1002); 26 Sep 2001 20:30:41 -0000 Message-Id: <20010926203041.66436.qmail@nollie.summersault.com> Date: 26 Sep 2001 20:30:41 -0000 From: mark@summersault.com Reply-To: mark@summersault.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/30850: prevent tar from creating empty tar files in some cases Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 30850 >Category: bin >Synopsis: prevent tar from creating empty tar files in some cases >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Sep 26 13:40:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Mark Stosberg >Release: FreeBSD 4.3-RELEASE i386 >Organization: Summersault, LLC >Environment: System: FreeBSD nollie.summersault.com 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Wed May 9 16:03:58 EST 2001 root@esperanza.summersault.com:/usr/src/sys/compile/NOLLIE.050901 i386 >Description: I would like for the tar binary to prevent the creation of empty tar files when no files are specified to tar up. Here's my "use case": I just downloaded a big tar, gzipped file and want to unpack it. I use: tar -czvf bigfile.tgz Oops, I just clobbered my file instead of opening it, despite having not specified any files to put in this new archive. >How-To-Repeat: tar -czvf test.tgz >Fix: Here's now GNU tar handles this, which I like better: $ tar -czvf tmp.tgz tar: Cowardly refusing to create an empty archive Try `tar --help' for more information. Perhaps I'm overlooking a good reason to support the ability to create empty archives. Thanks, -mark >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message