an alpm .files metadata explorer
C Perl
Pull request Compare This branch is 297 commits behind falconindy:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
INSTALL
Makefile
README.pod
match.c
match.h
nosr.c
nosr.h
result.c
result.h
update.c
update.h
util.c
util.h

README.pod

NAME

nosr - an alpm .files metadata explorer

SYNOPSIS

Usage: nosr [operation] [options] target

DESCRIPTION

nosr 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 nosr will return the package(s) which contain this file. The repos which nosr 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.

FILTERING

-b, --binaries

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

-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.

-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.

MATCHING

In --search mode and without the --regex or --glob option, nosr 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, nosr will always match against the full pathname.

In --list mode and without the --regex or --glob option, nosr 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/nosr

Storage location for metadata.

UPDATING VIA CRON

It's recommended that nosr's metadata files are updated on a daily basis. This can easily be accomplished by symlinking nosr into your daily cron rotation as the name nosr-update. For example:

  ln -s /usr/bin/nosr /etc/cron.daily/nosr-update

This will ensure that your cron daemon runs the job on a daily basis.

SEE ALSO

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

AUTHOR

Dave Reisner <dreisner@archlinux.org>