Is that currently full of data, or is that just the file system size.
Tar has a multi-volume feature where you could create multiple tar
archives. An advantage of using tar is that you can easily recover
individual files.
Another technique is that you can set up a script that copies file by file,
and keeps track of the size. The stat(1) command gives you the file size.
Your script can use a local variable to keep track of the aggregate size.
Something like this(I don't have time to really do this so think of this as
pseudo code:
#!/bin/ksh
# I am using ksh syntax
OUTDIR=/var/tmp/stage
INDIR=/home
#usage ls -la | script
SIZE=0
if [ "$1" != "" ] then
START=$1
else
START=
fi
cd $INDIR
read -r junk # get rid of the total line
while read perms links owner group fsize month day time fname
do
if [[ "$START" != "" && $fname != $START ]] then
continue
else
START=
fi
# You need to make sure that the file is a regular file.
# you can add directory processing later
NEWSIZE = $(expr $SIZE + $fsize)
if [[ $NEWSIZE > $MAXSIZE ]] then
echo "done at $fname"
exit(0)
fi
cp -p $fname $OUTDIR
SIZE=$NEWSIZE
done
For splitting a or resizing a file system, I prefer to use Partition Magic.
I always keep a bootable set of Partition Magic diskettes. IMHO, it is the
most reliable and stable system for resizing partitions.
On 13 Feb 2002 at 19:11, Tom Rauschenbach wrote:
>
>
>
> This has got to be on topic. It's about a Linux machine in New Hampshire!
>
> I have a filesystem that is 39389776 1k blocks. Obviously too big to back up
> on a single CD. I'd like to cut it up into separate file systems that can be
> backed up on CD.
>
> Does anyone know of a clever/fast/convenient way to do this ? I'm quite
> capable of writing the scripts to to do it (and I'll donate them to the list
> if I have to write them) but surely someone has already done this.
>
> TIA
>
> TomR
>
>
> *****************************************************************
> To unsubscribe from this list, send mail to [EMAIL PROTECTED]
> with the text 'unsubscribe gnhlug' in the message body.
> *****************************************************************
--
Jerry Feldman
Portfolio Partner Engineering
508-467-4315 http://www.testdrive.compaq.com/linux/
Compaq Computer Corp.
200 Forest Street MRO1-3/F1
Marlboro, Ma. 01752
*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************