*BSD News Article 48376


Return to BSD News archive

Path: sserve!euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!swidir.switch.ch!scsing.switch.ch!news.belwue.de!news.dfn.de!news.uni-augsburg.de!lrz-muenchen.de!thias!matthias
From: matthias@eikon.e-technik.tu-muenchen.de (Matthias Apitz)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: File Cut for a binary file
Date: 8 Aug 95 07:52:39 GMT
Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
Lines: 18
Distribution: world
Message-ID: <guru.807868359@thias>
References: <RPANCHOL.95Aug6204025@westphal.ch.intel.com>
NNTP-Posting-Host: thias.eikon.e-technik.tu-muenchen.de

rpanchol@westphal.ch.intel.com (Ranju Pancholi -FT-~) writes:

>I wish to find out if there exists routines to
>cut a binary file ( around 20 Meg ) into smaller
>segments of a specified size AND after transportation
>to another location JOIN them back into the original
>binary file ?

dd if=your_file of=aaa count=2000	(BTW: 2000*512 byte)
dd if=your_file of=bbb skip=2000 count=2000
dd if=your_file of=ccc skip=4000 count=2000
	....
After transportation use "cat aaa bbb ccc .... > your_new_file"
Maybe you should also use compress or gzip for the segments and
see also man dd(1)
Hope that helps.
-- 
matthias@eikon.e-technik.tu-muenchen.de