On Thu, 2002-11-07 at 10:01, RH wrote:
> Hello
> Please help mi with Spliting Files.
> for example I have 40 MB size file, and want to split it to 1 mb files, and then to 
>merge them. 
> 
> Thanks.

Hi,

Below describes teh use of 'split' and is taken from section 12.3 at:

http://www-rohan.sdsu.edu/doc/debian/ch-file_tools.html

Sometimes a file is too big to fit on a disk, or you don't want to send
a huge file over the net in a single chunk. You can split the file using
the split  utility, and reassemble it using the cat  (concatenate)
utility.

1. cd; cp /bin/bash myfile; ls -l myfile Copy the bash executable to a
file in your home directory called myfile. Observe that myfile occupies
a little over 300,000 bytes, or around 300 kilobytes.

2. split -b100k myfile myprefix Splits the file into sections of 100
kilobytes, naming the sections myprefixaa, myprefixab, etc. Type ls -l
so see the results. You can specify any number after the -b: choose one
that makes sense. If you leave off the k, it will be understood as bytes
instead of kilobytes. If you use m instead of k, it will be understood
as megabytes.

3. cat myprefix* > mynewfile Concatenate all the files and write them to
mynewfile. (The * and > are tricks you'll learn in another chapter FIXME
xref.)

4. rm myfile mynewfile myprefix* Remove everything. 

Regards

Philip Wyett

-- 

AIM: PhilipWyett
ICQ: 135463069
Email: [EMAIL PROTECTED]

--

Public key ID: 39018C68
Public key stored at: http://www.keyserver.net

--

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to