aperezdc / ltree

Utility to work with file lists in the format of the BSD mtree tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ltree

Utility to work with file lists in the format of the BSD mtree(8) tool.

Note: This is not a replacement for mtree, and you may want to have both installed side-by-side.

Building

Make sure you have libarchive and its development headers installed. Meson is used for configuration and Ninja for building; Samurai can be used for building as well:

meson build
ninja -C build

Usage

File lists in mtree format are accepted on standard input.

  • ltree -l < MTREE prints out the contents of the list. The -l flag can be omitted, as this is the default mode.

  • ltree -C < MTREE checks whether the files from the list are present in the file system and match the specification.

Operations which act on the file system accept a -p PATH command line option which prepends PATH as prefix to all the file names in the list. Verbose operation can be enabled with -v, which lists each entry as it is processed.

Any operation which prints paths in the output can output them delimited by null characters by passing -0 as a command line option.

Interoperability

The ltree tool can use file lists in the format recognized by libarchive.

On GNU/Linux the mtree port by @archiecobbs is known to generate compatible output.

License

Distributed under terms of the MIT/X11 license

About

Utility to work with file lists in the format of the BSD mtree tool

License:MIT License


Languages

Language:C 90.2%Language:Meson 9.8%