How to Create Tar multi-volume by using the automatic rename script provided in the manual of GNU Tar?
Hi everyone, please help I stuck, I try to create a multi-volume tar file that has the length of a CD ~ 650MB.
I try to follow the instructions of GNU Tar manual and follow the instructions that I got another little information on internet
http://www.gnu.org/software/tar/manual/html_node/Multi_002dVolume-Archives.html
PD: I’m not a programmer or developer.
According to that I think the procedure should be as follows:
1.- Make a file called new-volume.sh, with the content indicated by the manual GNU Tar as follows, and put this at the parenth folder to source files to tar multi-volume.
#! /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
2.- Make
sudo chmod 755 new-volume.sh
3.- Run
$ tar -c -L650M -f cd-disk.tar -F new-volume Videos
and theh, this give me an error
tar: new-volume: Cannot exec: No such file or directory tar: Error is not recoverable: exiting now tar: ‘new-volume’ command failed tar: Error is not recoverable: exiting now
This creates the first tar file named cd-disk.tar 650 MB correctly, but then throws an error and stop from making the tar multivolume.
Some clue?, Thanks.