On Thursday 28 November 2002 13:34, Ken Walker wrote:
> Is there any way to copy 8Gig of files to a nt machine, keeping all
> ownership/permissions/groups.
>
> I've tried taring but it stops at 2G.
>
> many thanks
>
> Mr Smiley
I'll take a stab at this.
1) you can have "tar' send to the standard output and "split" break the
standard input into small (< 2GB) files.
tar cf - my_directory | split -b 1000m
will create files xaa, xab, xac, xad, .... Each of them will be less than
1000 MB in size.
In order to un-tar them, you have to concatenate them and then un-tar:
cat xa* | tar xfp -
Of course, you have to be able to store the tar files of your 8GB of data
before transfering them if this is to work.
By the way, >>don't<< use this to create backups that fit onto CDs since
you lose your data if one CD is damaged.
2) Create a list of all of the files you want to transfer, then create many
tar files, each of them with just a few of your files.
cd my_directory/..
find . -type f > filelist.txt
numfiles=100 # We will put 100 files into each tar-ball/
# Calculate the total number of files:
lines=`wc -l filelist.txt | sed 's/ *\([0-9]*\) .*/\1/'`
numtarballs=`expr $lines / $numfiles`
for (( i = 0; i <= $numtarballs; i++ ));
do
min=`expr 1 + $numfiles \* $i`;
list=`tail +$min filelist.txt | head -${numfiles}`;
echo i = $i;
tar cf ball$i.tar $list;
done
You can use this solution if you don't have enough space to store all the
tar files on your server since you don't have to run the entire for loop
in one run.
Of course you have to adjust the variable numfiles so that your tar-files
don't become too many and so that none of them becomes larger than 2GB.
Hope this helps,
Narfi.
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com