Chunker is a command-line utility written in Go that splits a large file into smaller chunks based on a specified size. It's useful for breaking down large files into manageable pieces for easier handling or transfer.
- Split large files into smaller chunks.
- Specify the size of each chunk using intuitive size units (e.g., KB, MB, GB).
- Simple and easy-to-use command-line interface.
Make sure you have Go installed and configured on your system. Use go install to install Chunker:
go install github.com/itpey/chunker@latest
Ensure that your GOBIN
directory is in your PATH
for the installed binary to be accessible globally.
chunker <inputFilePath> <outputPrefix> <chunkSize>
- inputFilePath: Path to the input file that needs to be split.
- outputPrefix: Prefix for the output chunk files.
- chunkSize: Size of each chunk. Examples: 1KB, 5MB, 1GB.
chunker input.txt outputChunk 1MB
This command will split input.txt into approximately 1MB chunks named outputChunk_1, outputChunk_2, etc.
- B: Bytes
- KB: Kilobytes (1024 bytes)
- MB: Megabytes (1024 KB)
- GB: Gigabytes (1024 MB)
If you encounter any issues or have suggestions for improvement, please open an issue on GitHub.
We welcome contributions! Fork the repository, make your changes, and submit a pull request.
Chunker is open-source software released under the Apache License, Version 2.0. You can find a copy of the license in the LICENSE file.
Chunker was created by itpey