Date: Sun, 22 Sep 2019 07:50:21 +0100 From: Steve O'Hara-Smith <steve@sohara.org> To: Victor Sudakov <vas@mpeks.tomsk.su> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 22 Sep 2019 11:26:53 +0700 Victor Sudakov <vas@mpeks.tomsk.su> 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 <size> 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 <steve@sohara.org>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190922075021.015c9d5ff51eee211b5052fc>