Hi xeon123,
You said...... first
Quote:
“I would like to compress this file and split them into smaller files.”
|
then you said …...
Quote:
“How can I split this file into small ones to compress it?”
|
Do you want to compress first or split first? What are you trying to do?
Split the 6gb file to x number of files (file size is not that important to you, you just want x number of parts)
or
you want to split file to be a specific size.. (like 700mb if you want to put it in cds)
in that case you should compress first and split later.
How you compress (gzip, bzip2) I'll leave it up to you. This is normally what I do......
1)make a checksum (md5, shaxxx) of your uncompressed file.
2)compress the file.
3)make a checksum of your compressed file.
4)split the file (by file size or number parts).
5)copy it, email it, or what ever you want to do with it.....
6)join the file parts.
7)check to see if the joined file checksum match the checksum @ step 3.
8)decompress the joined file
9)check to see if the decompressed (joined file) checksum match the checksum @ step 1.
You can skip steps 1,3,7&9 if you are not that concerned about few error(s) that MIGHT creep-in during the whole process.
If you are really concerned about error(s) creeping in you should make a checksum after step 4 and 5
also.
Like “TobiSGD” said
split command is quite handy for a jobs like this (man split will give you more help)
I assume you will want to join the file parts …... for that use
cat command
lets say your compressed split-files are :
myfile.bz.part1
myfile.bz.part2
myfile.bz.part3
myfile.bz.part4
run
Code:
cat myfile.bz.part1 myfile.bz.part2 myfile.bz.part3 myfile.bz.part4 >myfile.bz
this will read myfile.bz.part1 to myfile.bz.part4 (in that order) and output to a file called “myfile.bz”
now you can decompress myfile.bz file.
I have used the above method for transferring a 10gb file via 4.7gb DVDrw.
Just make sure that you assemble the parts in correct order (checksums help here).
Hope you find this helpful
Peter.
.