Skip to Content
Linux in a Nutshell, 6th Edition
book

Linux in a Nutshell, 6th Edition

by Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
September 2009
Beginner
942 pages
85h 34m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, 6th Edition

Name

locate

Synopsis

locate [options] pattern

Search database(s) of filenames and print matches. Matches include all files that contain pattern unless pattern includes metacharacters, in which case locate requires an exact match. *, ?, [, and ] are treated specially; / and . are not. Searches are conducted against a database of system contents that is updated periodically. To update the database, use the updatedb command.

Options

-b, --basename

Look only at the basename when searching for matches.

-c, --count

List only the match count, not the individual filenames.

-d path, --database=path

Search databases in path. path must be a colon-separated list.

-h, --help

Print a help message and then exit.

-i, --ignore-case

Ignore case when performing matches.

-q, --quiet

Run quietly, printing no error messages.

-r regexp, --regexp regexp

Search for a basic regular expression, with no patterns allowed. May be issued more than once.

--regex

Treat all patterns as extended regular expressions.

-S, --statistics

Print statistics about each database and then exit.

-V, --version

Print version information and then exit.

-w, --wholename

Look at the entire pathname when searching for matches (the default).

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Unix in a Nutshell, 4th Edition

Unix in a Nutshell, 4th Edition

Arnold Robbins
Linux Under the Hood

Linux Under the Hood

Sander van Vugt
Linux Kernel in a Nutshell

Linux Kernel in a Nutshell

Greg Kroah-Hartman

Publisher Resources

ISBN: 9780596806088Errata Page