Split a gzip file
Hi Guys,
I have to download a log file , from my remote server to my desktop. The size of the file is around 35GB and it is a database dump file. I have "GZIP" it to around 5GB. Still it is showing the estimated time to download is around 39 hours. I find , there is a split command. But using the man pages of split, i am unable to split it into pieces. For example, I want the fail to be break into pieces of 512MB. How can i do that? Please Advise. Thanks in Advance. |
Try "split -b 500k filename"
|
Thank You SMbell100,
If i try with "split -b 500k Filename " , how could be the splited files appear? |
You can split the zipped file using the command:split -b 500k filename prefix,but unfortunately you can not unzip the small files independently unless you cat the all small files again.
|
I've had some bad experiences splitting up a compressed file. You might want to do the database dump and pipe it thru split by line numbers, then compress them for the copy.
When you split a database dump by size, you might cut it off right in the middle of a sql statement. Do it by line numbers, at least it will stay intact and then when you copy over the split dump files, there's really no need to put them back together, instead just make sure to reimport in the correct order or whatever you need to do with them. |
Thank you all
|
you can also split by the number of lines
this way you should specify that split is using the standard input by using the - zcat dbpedia-data-0.nq.gz | split -l 2000000 - dbpedia0 |
All times are GMT -5. The time now is 09:46 AM. |