P

partcp

PartCp - copy part of file

7acb53eb Add partcp.c · by Aleksey
Name Last Update
README.md Loading commit data...
partcp.c Loading commit data...

PartCp - copy part of file

You can copy portion of file using the GNU version of dd utility:

dd if=SourceFile of=DestinationFile skip=SliceOffset count=SliceLength bs=1M iflag=skip_bytes,count_bytes,fullblock

The BSD version of dd doesn't support iflag=skip_bytes,count_bytes,fullblock operand.
Install coreutils package to use the GNU version of dd in BSD OS.
After installation GNU dd will be available as gdd.

You can also employ easy to use partcp. It performs faster than dd on big and huge files.


Supported operating systems: GNU/Linux, Unix-like.

Build command: gcc -O2 -o partcp partcp.c

Usage: partcp source_file slice_offset slice_length destination_file