Skip to content
an alpm .files metadata explorer
C Perl Python Shell
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitattributes
.gitignore
INSTALL
Makefile
README.pod
bash_completion
macro.h
match.c
match.h
pkgfile.c
pkgfile.h
repo.c
repo.h
result.c
result.h
update.c
update.h

README.pod

NAME

pkgfile - an alpm .files metadata explorer

SYNOPSIS

Usage: pkgfile [operation] [options] target

DESCRIPTION

pkgfile searches the .files metadata created by repo-add(8) to retrieve file information about packages. By default, the provided target is considered to be a filename and pkgfile will return the package(s) which contain this file. The repos which pkgfile searches is determined by those enabled in /etc/pacman.conf.

OPERATIONS

-l, --list

The target is considered to be a package name rather than a filename, and the contents of the named package are returned. This allows for repo/package style syntax to limit the depth of the search.

-s, --search

Search for packages containing the provided target. This is the default mode of operation.

-u, --update

Update the stored metadata files. It is recommended to create a daily cron job with this command to ensure accurate results. By default, only modified repos will be downloaded. Pass this option twice to force update repo databases.

FILTERING

-b, --binaries

Return only files which are contained within a bin or sbin directory.

-d, --directories

Match directories in search results.

-g, --glob

Enable shell-style glob pattern matching. See glob(7).

-h, --help

Display the help message and quit.

-i, --ignorecase

Disable case sensitivity in matching.

-q, --quiet

Output less when using the --list operation.

-r, --regex

Enable regular expression matching. See pcre(3).

-R, --repo

Search only the specific repo.

-v, --verbose

Output more. This applies to the search operation.

DOWNLOADING

-z, --compress[=COMPRESSION]

Repack downloaded repos with the optionally supplied compression method, which may be one of none, gzip, bzip2, lzma, or xz. If this flag is passed without a compression method, this defaults to gzip. If this flag is not passed at all, no compression will be applied. Applying any form of compression will decrease performance, but may be desirable for disk space concerns.

MATCHING

In --search mode and without the --regex or --glob option, pkgfile will attempt to match the provided target as an exact filename. If the target contains a '/' character, a full path match will be attempted. With --regex and --glob enabled searching, pkgfile will always match against the full pathname. Note that full paths in the search database do not begin with a /.

In --list mode and without the --regex or --glob option, pkgfile will attempt to match the provided target as an exact package name. If the target contains a '/' character, the text before the slash will be assumed to be a repository and the search will be restricted. This behavior is disabled with --glob and --regex, and only matching against the package name will occur.

FILES

/var/cache/pkgfile

Storage location for metadata.

UPDATING VIA CRON

It is recommended that the .files databases are updated on a regular basis in order to ensure accurate results. This is easily accomplished by adding a cron job to run pkgfile with the --update flag daily.

SEE ALSO

repo-add(8), pcre(3), glob(7), pacman.conf(5)

AUTHOR

Dave Reisner <dreisner@archlinux.org>

Something went wrong with that request. Please try again.