[clug] Cut a file in place.

Paul Wayper paulway at mabula.net
Tue Sep 17 20:59:14 UTC 2019


On 18/9/19 6:30 am, Andrew Janke wrote:
> 
> Hi Paul,
> 
> Further context...  28Gb .tar.gz file, 16Gb left on my laptop, had to get said
> 28Gb file to a colleague in Canada. No chance of using SSH/Rsync.

So what are you uploading to?  How are you uploading?

> 28Gb upload
> to any web transfer mechanism was going to go wonky. Thus split into bits, get
> to him in bits, get him to run cat to put it back together.  Yes, a perfect
> use of a split archive, but then I didn't make the archive.

If you only wanted particular-sized chunks of the archive, you could simply
used dd with skip, block size and count, e.g.:

dd if=archive.tar.gz bs=1G skip=1 count=1 | curl -d @-
https://example.net/upload/split-ab.tar.gz

to get the second gigabyte.

Or create a torrent file of the entire archive using a public tracker, then
send him the torrent file, run a torrent client to seed it, and get them to
run a torrent client to download it.

Anyway, this is academic now.

HTH,

Paul



More information about the linux mailing list