LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Splitting a File (https://www.linuxquestions.org/questions/linux-newbie-8/splitting-a-file-293590/)

Slayer097 02-22-2005 05:36 PM

Splitting a File
 
I have a 1.5 MB file that I need to transfer from one PC to another using only 2 floppy disks. Is there any way I could split the file in half and then put it back together at the other computer (btw its a .deb file). Thanks.

michaelk 02-22-2005 05:43 PM

Ain't searching wonderfull

http://www.linuxquestions.org/questi...icle&artid=227

Compressing the file if it isn't already might bring it under 1.4 mb.

mjrich 02-22-2005 05:44 PM

EDIT: I really must type more quickly ;)

--


There are plenty of ways to do this, but the simplest IMHO is simply to use split:
Code:

split -b 700k foobar.mpeg

          then, at the other end:

cat xaa xab > newfoobar.mpeg

Cheers,

mj

Slayer097 02-22-2005 06:01 PM

Thanks but the only problem is the source computer is running WinXP and the target computer is running Linux.

jschiwal 02-22-2005 07:15 PM

First, try zipping the file to reduce its size. You can use 'unzip' to restore the original.

Another option is to nstall one of the windows rar programs. Use 'unrar' in linux to restore it.

Another option is to use a USB keydrive to transfer the file.

Another option is to use network sharing instead of 'sneaker net'.

Another option is to send the file using e-mail. ( Assuming the server allows extensions that size ).

There is also a windows split program but I don't know what it is called. I think it is shareware. On the linux side you will want to delete the file with the .000 extention and use 'cat <basename>.[[:digit:]][[:digit:]][[:digit:]]' to re-assemble the file.
The .000 file will just contain meta-information, so you don't want it starting the assembled file.


The cat program will sort the arguments alphabetically, to the parts get put together in the correct order. For windows, you need a script that uses copy /b source.001 /b +source.002 /b ...
to re-assemble the pieces.

----

Update: there is a freeware program called HJsplit. It also has a linux version, which you might want to use if you were to go from Linux -> Windows.
http://www.freebyte.com/hjsplit/#linux


All times are GMT -5. The time now is 04:53 PM.