---
name: "ffindex_build"
section: "1"
platform: "linux"
package: "ffindex"
version: "0.9.9.9-7+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ffindex_build"
---

# ffindex\_build(1)

build file index from files in directories

## NAME

ffindex\_build - build file index from files in directories

## DESCRIPTION

USAGE: ffindex\_build \[-a\|-v\] \[-s\] \[-f file\]\* OUT\_DATA\_FILE OUT\_INDEX\_FILE \[-d 2ND\_DATA\_FILE **-i** 2ND\_INDEX\_FILE\] \[DIR\_TO\_INDEX\|FILE\]\*

- **-a**

  append files/indexes, also needed for sorting an already existing ffindex

- **-d** FFDATA\_FILE

  a second ffindex data file for inserting/appending

**-i** FFINDEX\_FILE a second ffindex index file for inserting/appending

- **-f** FILE

  file containing a list of file names, one per line **-f** can be specified up to 4096 times

- **-s**

  sort index file, so that the index can queried. Another append operations can be done without sorting.

- **-v**

  print version and other info then exit

- **-h**

  display this help message

ENVIRONMENT

-

  FFINDEX\_MAX\_INDEX\_ENTRIES - allocate memory for this number of entries

### EXAMPLES:

-

  Create a new ffindex containing all files from the "bar/" directory containing say myfile1.txt, myfile2.txt and sort (**-s**) it so that e.g. ffindex\_get can use it.

-

  `$ ffindex_build -s foo.ffdata foo.ffindex bar/`

-

  Add (**-a**) more files: myfile3.txt, myfile4.txt.

-

  `$ ffindex_build -a foo.ffdata foo.ffindex myfile3.txt myfile4.txt`

-

  Oops, forgot to sort it (**-s**) so do it afterwards:

-

  `$ ffindex_build -as foo.ffdata foo.ffindex`

### NOTE:

-

  Compiled with a maximum key/filename length is 63 and default maximum entries 80000000. This can be changed in the sources.

Designed and implemented by Andreas Hauser \<andy@splashground.de\>.

## BUGS

User feedback is welcome, especially bugs, performance issues and last but not least convenience of the programs and API.

Email Andreas Hauser hauser@genzentrum.lmu.de.
