Scroll to navigation



gaffitter - File subsets extractor based on genetic algorithms


gaffitter -t|--target value[unit] [OPTION]... FILE...
gaffitter - -t|--target value[unit] [OPTION]... [FILE]...


gaffitter (Genetic Algorithm File Fitter) is a command-line software written in C++ that extracts --via genetic algorithm-- subsets of an input list of files/directories that best fit the given volume size (target), such as CD, DVD and others.

If gaffitter is executed using the second option listed above, the information about files is fetched from stdin.

The unit suffixes 'k', 'm', 'g' or 't' can be used, where: k = KB/KiB, m = MB/MiB, g = GB/GiB and t = TB/TiB. Default: bytes.


Set VALUE as target size (mandatory), VALUE > 0.0

Set VALUE as the maximum number of bins (volumes). [default = "unlimited"]

Use powers of 1000 (not 1024) for target, min, max and output sizes.

Minimum file size. [default = none]

Maximum file size. [default = none]

The smallest amount of bytes a file can occupy. [default = 1]

Print the size of each file.

Also print the sizes in bytes.

Don't print selected files.

Hide summary line containing sum, difference and number of selected files.

Sort the output by size, not by name.

Use case-insensitive sorting.

Sort the output in reverse order.

Enclose file names with CHAR. [default = none]

Delimit file names (lines) with CHAR. [default = newline]

Assume NULL ( ) as the delimiter of input files via stdin (pipe).

Same as --dw '\0'. See also the -0 and --hs options.

-0, --null-bins
Same as --bs '\0'. See also the -Z and --hs options.

Separate bins (vols) with CHAR. [default = newline]

Print gaffitter version and exit.


Print help and exit.

Switch to direct input mode, i.e., read directly "size identifier" pairs instead of file names.

Assume input sizes as bytes.

Assume input sizes as kibi bytes (KiB). KB if --di-si.

Assume input sizes as mebi bytes (MiB). MB if --di-si.

Assume input sizes as gibi bytes (GiB). GB if --di-si.

Assume input sizes as tebi bytes (TiB). TB if --di-si.

Use powers of 1000 (not 1024) for input sizes.

GA initialization seed, VALUE >= 0. Zero means random. [default = 1]

Use rendom GA seed (same as --ga-seed 0).

Maximum number of generations, VALUE > 0. [default = auto]

Number of individuals, VALUE > tournament_size. [default = auto]

Crossover probability, 0.0 <= VALUE <= 1.0. [default = 0.95]

Mutation probability (per gene), 0.0 <= VALUE <= 1.0. [default = auto]

Selection pressure (tournament size), 2 <= VALUE < pop_size. [default = 2]

Stop if the theoretical minimum number of bins is reached. If VALUE is given, it is assumed to be the theoretical minimum number of bins.

Approximate the solution using Best First search (non-optimal but very fast).

Just split the input when target size is reached (preserves original order while splitting).


Written by Douglas A. Augusto <>. This manpage has been written by Nacho Barrientos Arias <> for the Debian GNU/Linux system (but may be used by others).


Report bugs to Douglas A. Augusto <>.


Copyright © 2005-2009, Douglas A. Augusto <> - All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, Inc.


September 24, 2009 gaffitter 0.6.0