From owner-freebsd-questions@freebsd.org Sun Sep 22 06:50:32 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F032F6C54 for ; Sun, 22 Sep 2019 06:50:32 +0000 (UTC) (envelope-from 4250.10.freebsd-questions=freebsd.org@email-od.com) Received: from s1-b0c6.socketlabs.email-od.com (s1-b0c6.socketlabs.email-od.com [142.0.176.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46bdPf64P5z4QpD for ; Sun, 22 Sep 2019 06:50:30 +0000 (UTC) (envelope-from 4250.10.freebsd-questions=freebsd.org@email-od.com) DKIM-Signature: v=1; a=rsa-sha256; d=email-od.com;i=@email-od.com;s=dkim; c=relaxed/relaxed; q=dns/txt; t=1569135031; x=1571727031; h=content-transfer-encoding:content-type:mime-version:references:in-reply-to:message-id:subject:cc:to:from:date:x-thread-info; bh=rYS0m/bHYPccNWXQf2kC4MIiAZjFZ6XqPlPqEn9ye6s=; b=QDnn0udpmwyhbImn5W+y2rrMz0uiUjZ3IqFZrEOjvAbQ3rYI9r+q8MONGuorECbUi1GpCWYUDeUTQQYxdY4m9j/lUXvzVJzx0LmfMVSf2miU8OA2QWNvPAQzK13oYvaAVWlnqGdGi4iUorvHq+uDHBrNJsqh8l22To/Q4tvanic= X-Thread-Info: NDI1MC4xMi4xYzMwMDAwMDExYjRlMjMuZnJlZWJzZC1xdWVzdGlvbnM9ZnJlZWJzZC5vcmc= Received: from r3.us-east-2.aws.in.socketlabs.com (r3.us-east-2.aws.in.socketlabs.com [142.0.189.3]) by mxsg2.email-od.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Sun, 22 Sep 2019 02:50:24 -0400 Received: from smtp.lan.sohara.org (EMTPY [185.202.17.215]) by r3.us-east-2.aws.in.socketlabs.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Sun, 22 Sep 2019 02:50:23 -0400 Received: from [192.168.63.1] (helo=steve.lan.sohara.org) by smtp.lan.sohara.org with smtp (Exim 4.91 (FreeBSD)) (envelope-from ) id 1iBvhN-000JbD-Ci; Sun, 22 Sep 2019 07:50:21 +0100 Date: Sun, 22 Sep 2019 07:50:21 +0100 From: Steve O'Hara-Smith To: Victor Sudakov Cc: freebsd-questions@freebsd.org Subject: Re: multi-volume archives Message-Id: <20190922075021.015c9d5ff51eee211b5052fc@sohara.org> In-Reply-To: <20190922042653.GB38319@admin.sibptus.ru> References: <20190921063003.GA81956@admin.sibptus.ru> <20190921093801.4638945715fe79eb6a99b36f@sohara.org> <20190921182558.GB15412@admin.sibptus.ru> <20190921195407.256410cee20741ef86f2c1e0@sohara.org> <20190922042653.GB38319@admin.sibptus.ru> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) X-Clacks-Overhead: "GNU Terry Pratchett" Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46bdPf64P5z4QpD X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=email-od.com header.s=dkim header.b=QDnn0udp; dmarc=none; spf=pass (mx1.freebsd.org: domain of 4250.10.freebsd-questions=freebsd.org@email-od.com designates 142.0.176.198 as permitted sender) smtp.mailfrom=4250.10.freebsd-questions=freebsd.org@email-od.com X-Spamd-Result: default: False [-1.72 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.94)[-0.938,0]; R_DKIM_ALLOW(-0.20)[email-od.com:s=dkim]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:142.0.176.0/20]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sohara.org]; FORGED_SENDER_VERP_SRS(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[email-od.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[198.176.0.142.list.dnswl.org : 127.0.15.0]; ENVFROM_VERP(0.00)[]; IP_SCORE(0.22)[ip: (-0.45), ipnet: 142.0.176.0/22(0.91), asn: 7381(0.68), country: US(-0.05)]; FORGED_SENDER(0.00)[steve@sohara.org,4250.10.freebsd-questions=freebsd.org@email-od.com]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:7381, ipnet:142.0.176.0/22, country:US]; FROM_NEQ_ENVFROM(0.00)[steve@sohara.org,4250.10.freebsd-questions=freebsd.org@email-od.com]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2019 06:50:32 -0000 On Sun, 22 Sep 2019 11:26:53 +0700 Victor Sudakov wrote: > Steve O'Hara-Smith wrote: > > [dd] > > > > However, this understanding of multiple volumes is not convenient for > > > writing to a formatted flash drive. > > > > You can use -L and perhaps the --new-volume-script > > option > > Only if the --new-volume-script can change the archive name. Which of course it can - from the documentation: ------------------------------------------------------------------------- The volume script can instruct tar to use new archive name, by writing in to file descriptor $TAR_FD (see below for an example). ------------------------------------------------------------------------- #! /bin/bash # For this script it's advisable to use a shell, such as Bash, # that supports a TAR_FD value greater than 9. echo Preparing volume $TAR_VOLUME of $TAR_ARCHIVE. name=`expr $TAR_ARCHIVE : '\(.*\)-.*'` case $TAR_SUBCOMMAND in -c) ;; -d|-x|-t) test -r ${name:-$TAR_ARCHIVE}-$TAR_VOLUME || exit 1 ;; *) exit 1 esac echo ${name:-$TAR_ARCHIVE}-$TAR_VOLUME >&$TAR_FD ---------------------------------------------------------------------- -- Steve O'Hara-Smith