
252
|
Chapter 3: Linux Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
Examples
Print the category name and all keywords for date and time
settings:
locale -ck LC_TIME
Print the strings used for days of the week and months of the year:
locale day mon
locate
locate [options] pattern
Search database(s) of filenames and print matches. Matches
include all files that contain pattern unless pattern includes meta-
characters, 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
-d path, --database=path
Search databases in path. path must be a colon-separated list.
-h, --help
Print a help message and then exit.
--version
Print version information and then exit.
lockfile
lockfile [options] filenames
Create semaphore file(s), used to limit access to a file. When lock-
file fails to create some of the specified files, it pauses for eight
seconds and retries the last one on which it failed. The command
processes flags as they are encountered (i.e., a flag that is specified
after a file will not affect that file). This command is most often
used by scripts and applications as a way to avoid multiple users
changing the same file at once.
Options
-sleeptime
Number ...