cr_dirsplitter 0.0.2

Crystal port of : https://github.com/jinyus/dirsplitter .Split large directories into parts of a specified maximum size

dirsplitter

Split large directories into parts of a specified maximum size while maintaining structure. This is a crystal port of my dirsplitter tool.

Go version (more binaries available)
F# Version
Nim Version

How to build:

crystal build src/dirsplitter.cr --release --no-debug

Or download the prebuild binary (linux 64bit) only from: https://github.com/jinyus/cr_dirsplitter/releases

Usage:
   dirsplitter COMMAND

Commands:

  split            Split directories into a specified maximum size
  reverse          Opposite of the main function, moves all files from     
                   part folders to the root

Options:
  -h, --help

SPLIT USAGE:

Splits directory into a specified maximum size

Usage:
dirsplitter split [options] 

Options:
-h, --help
-d, --dir=DIR              Target directory (default: ".")
-m, --max=MAX              Max part size in GB (default: 5.0)
-p, --prefix=PREFIX        Prefix for output files of the tar command. 
                           eg: myprefix.part1.tar (default: "")

example:

dirsplitter split --dir ./mylarge2GBdirectory --max 0.5

This will yield the following directory structure:

📂mylarge2GBdirectory
 |- 📂part1
 |- 📂part2
 |- 📂part3
 |- 📂part4

with each part being a maximum of 500MB in size.

Undo splitting

dirsplitter reverse --dir ./mylarge2GBdirectory

Repository

cr_dirsplitter

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 1
  • 8 months ago
  • December 21, 2021
License

MIT License

Links
Synced at

Sun, 19 May 2024 08:53:38 GMT

Languages