FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 11-28-2007, 10:35 PM
"Lux Zhang"
 
Default file splitter and merger??

Hi
what are tools to split a large file (etc 700mb a.avi) into small
pieces and then the merger to merge them?
thanks
Yuan

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-28-2007, 10:41 PM
Peter Gordon
 
Default file splitter and merger??

On Thu, 2007-11-29 at 10:35 +1100, Lux Zhang wrote:
> Hi
> what are tools to split a large file (etc 700mb a.avi) into small
> pieces and then the merger to merge them?
> thanks
> Yuan

For general-purpose tools, try split (to separate the file) and cat (to
recreate it from its pieces).

Specific multimedia formats may have their own tools capable of dealing
with the the actual media rather than the file container, which may suit
your needs a bit more closely. Not sure...

Hope that helps.
--
Peter Gordon (codergeek42)
GnuPG Public Key ID: 0xFFC19479 / Fingerprint:
DD68 A414 56BD 6368 D957 9666 4268 CB7A FFC1 9479


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-28-2007, 10:49 PM
Les Mikesell
 
Default file splitter and merger??

Lux Zhang wrote:

Hi
what are tools to split a large file (etc 700mb a.avi) into small
pieces and then the merger to merge them?


split and cat

--
Les Mikesell
lesmikesell@gmail.com

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-28-2007, 10:50 PM
Frank Cox
 
Default file splitter and merger??

On Wed, 28 Nov 2007 17:49:01 -0600
Les Mikesell <lesmikesell@gmail.com> wrote:

> split and cat

So you're saying that there's more than one way to split a cat?

*tee hee*

--
MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-28-2007, 10:55 PM
"Lux Zhang"
 
Default file splitter and merger??

On Nov 29, 2007 10:50 AM, Frank Cox <theatre@sasktel.net> wrote:
> On Wed, 28 Nov 2007 17:49:01 -0600
> Les Mikesell <lesmikesell@gmail.com> wrote:
>
> > split and cat
>
> So you're saying that there's more than one way to split a cat?
>
> *tee hee*
>
> --
> MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com
>
>
> --
> fedora-list mailing list
> fedora-list@redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>


thanks for info. 'split and cat' may be sufficient for me. I mainly
need these for transporting a multimedia file from remote size.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-28-2007, 11:12 PM
Les Mikesell
 
Default file splitter and merger??

Lux Zhang wrote:


thanks for info. 'split and cat' may be sufficient for me. I mainly
need these for transporting a multimedia file from remote size.


If you are doing it over a network, rsync with the -P option will let
you restart if the transfer is interrupted. If you are using physical
media, laptop type drives in an external USB case are convenient and
available in sizes up to 250 gigs.


--
Les Mikesell
lesmikesell@gmail.com

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-29-2007, 01:06 AM
Dave Ihnat
 
Default file splitter and merger??

On Thu, Nov 29, 2007 at 10:35:32AM +1100, Lux Zhang wrote:
> what are tools to split a large file (etc 700mb a.avi) into small
> pieces and then the merger to merge them?

People have suggested 'split' and 'cat'. These are at best marginal, at
worst simply won't work for binary files.

Look for a script called 'bsplit'. If you can't find a distributed version,
something like the attached will work.

Cheers,
--
Dave Ihnat
President, DMINET Consulting, Inc.
dihnat@dminet.com
#
# bsplit [n] name
#
# Breaks a file into N-block parts, where a block is 512 bytes
#
# Author: Dave Ihnat. Released as a work in the Public Domain.

BCOUNT=0
FCOUNT=0
BSKIP=0

if [ $# -eq 2 ]
then
BCOUNT=$1;
shift;
else
BCOUNT=100;
fi;

OUTFILE=$1;
PREFIX=00

while [ TRUE ]
do
echo "$OUTFILE.${PREFIX}${FCOUNT}"

# dd of=$OUTFILE.${PREFIX}${FCOUNT} skip=$BSKIP count=$BCOUNT
dd of=$OUTFILE.${PREFIX}${FCOUNT} count=$BCOUNT

if [ $? -ne 0 ]
then
break;
fi;

if [ ! -s $OUTFILE.${PREFIX}${FCOUNT} ]
then
rm $OUTFILE.${PREFIX}${FCOUNT}
break;
fi;

FCOUNT=`expr $FCOUNT + 1`
if [ "$FCOUNT" -gt 99 ]
then
PREFIX=""
elif [ "$FCOUNT" -gt 9 ]
then
PREFIX="0"
fi;

BSKIP=`expr $BSKIP + $BCOUNT`
done

exit 0
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-29-2007, 01:19 AM
Jeff Krebs
 
Default file splitter and merger??

perhaps it was mentioned already, but "rar" (from FreshRPMs) compresses
AND splits files into multiple parts.

I've used it for moving large files (> 4 GB) across fat32 partitions.

An additional benefit is that the archiver is truly cross-platform, so
moving files between Windows and 'nix is simplified.

Jeff Krebs


* Dave Ihnat (dihnat@dminet.com) wrote:
> On Thu, Nov 29, 2007 at 10:35:32AM +1100, Lux Zhang wrote:
> > what are tools to split a large file (etc 700mb a.avi) into small
> > pieces and then the merger to merge them?
>
> People have suggested 'split' and 'cat'. These are at best marginal, at
> worst simply won't work for binary files.
>
> Look for a script called 'bsplit'. If you can't find a distributed version,
> something like the attached will work.
>
> Cheers,
> --
> Dave Ihnat
> President, DMINET Consulting, Inc.
> dihnat@dminet.com

> #
> # bsplit [n] name
> #
> # Breaks a file into N-block parts, where a block is 512 bytes
> #
> # Author: Dave Ihnat. Released as a work in the Public Domain.
>
> BCOUNT=0
> FCOUNT=0
> BSKIP=0
>
> if [ $# -eq 2 ]
> then
> BCOUNT=$1;
> shift;
> else
> BCOUNT=100;
> fi;
>
> OUTFILE=$1;
> PREFIX=00
>
> while [ TRUE ]
> do
> echo "$OUTFILE.${PREFIX}${FCOUNT}"
>
> # dd of=$OUTFILE.${PREFIX}${FCOUNT} skip=$BSKIP count=$BCOUNT
> dd of=$OUTFILE.${PREFIX}${FCOUNT} count=$BCOUNT
>
> if [ $? -ne 0 ]
> then
> break;
> fi;
>
> if [ ! -s $OUTFILE.${PREFIX}${FCOUNT} ]
> then
> rm $OUTFILE.${PREFIX}${FCOUNT}
> break;
> fi;
>
> FCOUNT=`expr $FCOUNT + 1`
> if [ "$FCOUNT" -gt 99 ]
> then
> PREFIX=""
> elif [ "$FCOUNT" -gt 9 ]
> then
> PREFIX="0"
> fi;
>
> BSKIP=`expr $BSKIP + $BCOUNT`
> done
>
> exit 0

> --
> fedora-list mailing list
> fedora-list@redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-29-2007, 01:23 AM
Les Mikesell
 
Default file splitter and merger??

Dave Ihnat wrote:

On Thu, Nov 29, 2007 at 10:35:32AM +1100, Lux Zhang wrote:

what are tools to split a large file (etc 700mb a.avi) into small
pieces and then the merger to merge them?


People have suggested 'split' and 'cat'. These are at best marginal, at
worst simply won't work for binary files.


I can't recall a case where split with a byte count followed by a cat of
the generated files didn't reproduce the input. What can possibly go wrong?


--
Les Mikesell
lesmikesell@gmail.com

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 11-29-2007, 01:31 AM
Frank Cox
 
Default file splitter and merger??

On Wed, 28 Nov 2007 20:19:23 -0600
Jeff Krebs <jkrebs@tconl.com> wrote:

> perhaps it was mentioned already, but "rar" (from FreshRPMs) compresses
> AND splits files into multiple parts.

I thought rar was a commercial "send in the cash" program, and only unrar (the
de-compressor) was provided free of charge.

Has that changed?

--
MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 08:46 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org