[TriLUG] tar-1.14 can't make large files
Ed Hill
ed at eh3.com
Fri Jul 30 11:52:34 EDT 2004
On Fri, 2004-07-30 at 11:13, Joseph Mack NA3T wrote:
> I can't make a file over 1Gbyte with tar-1.14 (the latest tar). I have
> glibc-2.3.2, gcc-2.95.3, mke2fs-1.32 (from Nov 2002, the latest e2fsprogs
> is 1.35).
>
> This is an older system. I'm wondering what else I need to be
> able to make files >1Gbyte.
Hi Joe,
Theres another option. You can have Gnu tar create a huge archive that
spans multiple files. The way to do this is to use the tar -L
("--tape-length N") and -F ("--new-volume-script NAME") options to
create a new archive file every, say, 999MB.
I've done this:
echo '#! /usr/bin/env bash' > change_tape
echo 'n=`ls -1 yo.tar.?* 2>/dev/null | wc -l`' >> change_tape
echo 'mv -f yo.tar "yo.tar."$n' >> change_tape
chmod +x change_tape
dd bs=1000000 count=3 if=/dev/zero of=./test
tar --new-volume-script=./change_tape --tape-length 500 -cvf yo.tar
./test
./change_tape
and it works. To un-tar the multiple files you can either cat them
together or write a simple script that does the reverse:
cat yo.tar.* | tar -xvf -
This sort of thing can produce tar files that span multiple CDRs, etc.
Ed
--
Edward H. Hill III, PhD
office: MIT Dept. of EAPS; Rm 54-1424; 77 Massachusetts Ave.
Cambridge, MA 02139-4307
emails: eh3 at mit.edu ed at eh3.com
URLs: http://web.mit.edu/eh3/ http://eh3.com/
phone: 617-253-0098
fax: 617-253-4464
More information about the TriLUG
mailing list