Recfiles

Plain text database format

recfilesFilename extension|

`.rec`

|

Type of format| Data interchange
Open format?| yes
Free format?| yes
Website| www.gnu.org/software/recutils/

recfiles is a file format for human-editable, plain text databases.[1][2]

GNU Recutils

Original author(s)| Jose E. Marchesi
Initial release| December 3, 2010; 14 years ago (2010-12-03)
Stable release|

1.9 / April 16, 2022; 3 years ago (2022-04-16)[3]

Repository| git.savannah.gnu.org/cgit/recutils.git
Written in| C
License| GNU General Public License
Website| www.gnu.org/software/recutils/

Databases using this file format can be edited using any text editor. Recfiles allow for basic relational database operations, such as typing, auto-incrementing, as well as a simple join operation.

Recutils is a collection of tools, like recfmt, recsel, and rec2csv used to work with recfile databases.[4] Various software libraries support the format.[5][6][7]

## Syntax

[edit]

Data are stored in text files with empty lines separating records. Fields within a record are lines starting with their name and a colon; it is possible to wrap long entries. Multiple record types can be maintained in a single text file.

## Example

[edit]

# This is a recfile document.

%rec: Text
%type: Year int

Author: Doug McIlroy
Year: 1964
Note: The Origin of Unix Pipes

Title: Unix Text Processing
Author: Dale Dougherty
Author: Tim O'Reilly
Year: 1987
Publisher: Hayden Books

Author: William Shakespeare
Title: Hamlet
Year: 1599
Year: 1600
Year: 1601

## Utilities

[edit]

Recutils from the GNU Project are a set of free command line utilities to process recfiles.[8] These include:

* recsel – search for and print fields from records matching a query
* recins – insert a record, or replace existing records
* recdel – delete a record, or delete a set of records
* recfix – sort the records
* recset – add or update individual fields

This example command would output the following three lines (of the two original entries, one having two authors):

$ recsel -e 'Year > "1900"' -p Author
Author: Doug McIlroy
Author: Dale Dougherty
Author: Tim O'Reilly

## See also

[edit]

* Free and open-source software portal

* asciidoc
* TOML
* org-mode
* Flat-file database

## References

[edit]

1. ^ Marchesi, Jose E (2019-01-03). "Purpose". GNU Recutils Manual. Retrieved 2020-12-02.
2. ^ James Tomasino (2020-01-26). "GNU Recutils". Retrieved 2020-02-09.
3. ^ "Index of /gnu/recutils". ftp.gnu.org. Retrieved 11 April 2023.
4. ^ "GNU Recutils - GNU Project - Free Software Foundation".
5. ^ František Kučera (2019-04-08). "Relational pipes and GNU Recutils".
6. ^ "Python-recutils". GitHub. 12 January 2022.
7. ^ "Aisamanra/Rrecutils". GitHub. 13 January 2022.
8. ^ "GNU Recutils". www.gnu.org. Retrieved 3 January 2025.

## External links

[edit]

* Official website

* v
* t
* e

GNU Project

History|

* GNU Manifesto
* Free Software Foundation
* Europe
* India
* Latin America
* History of free software

Licenses|

* GNU General Public License
* linking exception
* font exception
* GNU Lesser General Public License
* GNU Affero General Public License
* GNU Free Documentation License
* GNAT Modified General Public License

Software|

* GNU (variants)
* Hurd
* Linux-libre
* glibc
* Bash
* coreutils
* findutils
* Build system
* GCC
* binutils
* GDB
* GRUB
* GNUstep
* GIMP
* Jami
* GNU Emacs
* GNU TeXmacs
* GNU Octave
* GNU Taler
* GNU R
* GSL
* GMP
* GNU Electric
* GNU Archimedes
* GNUnet
* GNU Privacy Guard
* Gnuzilla (IceCat)
* GNU Health
* GNUmed
* GNU LilyPond
* GNU Go
* GNU Chess
* Gnash
* Guix
* more...

Contributors|

* Benjamin Mako Hill
* Bradley M. Kuhn
* Brian Fox
* Federico Heinz
* John Sullivan
* Nagarjuna G.
* Richard M. Stallman

Other topics|

* GNU/Linux naming controversy
* Revolution OS
* Free Software Foundation anti-Windows campaigns
* Defective by Design

* v
* t
* e

Data exchange formats

Human
readable|

* Atom
* CSV
* EDIFACT
* JSON
* Web Encryption
* Web Token
* Web Signature
* Property list
* RDF
* Rebol
* TOML
* XML
* YAML

Binary|

* AMF
* Ascii85
* ASN.1
* SMI
* Avro
* Base32
* Base64
* Bencode
* BSON
* UBJSON
* Cap'n Proto
* CBOR
* FlatBuffers
* MessagePack
* Property list
* Protocol Buffers
* Thrift
* Cyphal DSDL
* XDR
* uuencode
* yEnc

Comparison of data-serialization formats

This free and open-source software article is a stub. You can help Wikipedia by expanding it.

|

* v
* t
* e

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template