QUOTE
Comment from bichelmo on 05/23/06:
tar -cMf /tar_destination/tarfilename.tar -L 45000000 /home/*
will allow you to create multiple 4.7G tar files but you will have to interact. When it prompts for the next volume you can enter another filename and accept. Example( Prepare volume #2 for `test.tar' and hit return: n test2.tar )
/QUOTE (sorry, I don't know if there is a better way to do this here)
You could use pipes for this. The easiest way I can think of is to determine the maximum number of chunks the tar file will be split into. Then:
for ((i = 2; i < NUM_FILES; i++)) ; do echo "n file$i.tar" ; done > foo
tar -cMf /tar_destination/tarfilename.tar -L 45000000 /home/* < foo
That will create a file "foo", which consists of a lot of lines of "n fileNUMBER.tar"s. Then, those lines will be treated as the standard input source for the tar command.
I should mention that there are probably better ways to do this. The following may work, too:
tar -cMf /tar_destination/tarfilename.tar -L 45000000 /home/* < ` for ((i = 2; i < NUM_FILES; i++)) ; do echo "n file$i.tar" ; done `
just be sure to use the backticks (under the tilde) rather than single quotes. I should note that I have not tried the latter lines.