-->

Previous | Table of Contents | Next

Page 293

ENVIRONMENT

REFER Default database

FILES

/usr/dict/papers/Ind Default database to be used if the REFER ENVIRONMENT variable is not set.
filename.i Index FILES.

SEE ALSO

grefer(1), glookbib(1), gindxbib(1)

Groff Version 1.09, 6 August 1992

ln

ln—Make links between FILES

SYNOPSIS

ln [OPTIONS] source [dest]

ln [OPTIONS] source... directory

OPTIONS:

[_bdfinsvF] [_S backup-suffix] [_V {numbered,existing,simple}]

[--version-control={numbered,existing,simple}] [--backup] [--directory]

[--force] [--interactive] [--no_dereference] [--symbolic] [--verbose]

[--suffix=backup-suffix] [--help] [--version]

DESCRIPTION

This manual page documents the GNU version of ln. If the last argument names an existing directory, ln links each other given file into a file with the same name in that directory. If only one file is given, it links that file into the current directory. Otherwise, if only two FILES are given, it links the first onto the second. It is an error if the last argument is not a directory and more than two FILES are given. It makes hard links by default. By default, it does not remove existing FILES.

OPTIONS

_b, --backup Make backups of FILES that are about to be removed.
_d, _F, --directory Allow the superuser to make hard links to directories.
_f, --force Remove existing destination FILES.
_i, --interactive Prompt whether to remove existing destination FILES.
_n, --no-dereference When the specified destination is a symbolic link to a directory, attempt to replace the symbolic link rather than dereferencing it to create a link in the directory to which it points. This option is most useful in conjunction with --force.
_s, --symbolic Make symbolic links instead of hard links. This option produces an error message on systems that do not support symbolic links.
_v, --verbose Print the name of each file before linking it.
--help Print a usage message on standard output and exit successfully.
--version Print version information on standard output then exit successfully.
_S, --suffix backup-suffix The suffix used for making simple backup FILES can be set with the SIMPLE_BACKUP_SUFFIX ENVIRONMENT variable, which can be overridden by this option. If neither of those is given, the default is ~, as it is in Emacs.

Page 294

_V, --version-control {numbered,existing,simple} The type of backups made can be set with the VERSION_CONTROL ENVIRONMENT variable, which can be overridden by this option. If VERSION_CONTROL is not set and this option is not given, the default backup type is existing. The value of the VERSION_CONTROL ENVIRONMENT variable and the argument to this option are like the GNU Emacs version-control variable; they also recognize synonyms that are more descriptive. The valid values (unique abbreviations are accepted) are the following:
t or numbered Always make numbered backups.
nil or existing Make numbered backups of FILES that already have them, simple backups of the others.
never or simple Always make simple backups.

GNU File Utilities

lndir

lndir—Create a shadow directory of symbolic links to another directory tree

SYNOPSIS

lndir fromdir [todir]

DESCRIPTION

lndir makes a shadow copy todir of a directory tree fromdir, except that the shadow is not populated with real FILES but instead with symbolic links pointing at the real FILES in the fromdir directory tree. This is usually useful for maintaining source code for different machine architectures. You create a shadow directory containing links to the real source which you will have usually NFS mounted from a machine of a different architecture, and then recompile it. The object FILES will be in the shadow directory, while the source FILES in the shadow directory are just symlinks to the real FILES.

This has the advantage that if you update the source, you need not propagate the change to the other architectures by hand because all source in shadow directories are symlinks to the real thing: Just cd to the shadow directory and recompile away.

The todir argument is optional and defaults to the current directory. The fromdir argument may be relative (for example, ../src) and is relative to todir (not the current directory).

Note that RCS, SCCS, and CVS.adm directories are not shadowed.

If you add FILES, simply run lndir again. Deleting FILES is a more painful problem; the symlinks will just point into never-neverland.

BUGS

patch gets upset if it cannot change the FILES. You should never run patch from a shadow directory anyway.

You need to use something like this:

find todir _type l _print | xargs rm

to clear out all FILES before you can relink (if fromdir moved, for instance). Something like this:

find . \! _type d _print

will find all FILES that are not directories.

X Version 11 Release 6

Page 295

locate

locate—List FILES in databases that match a pattern

SYNOPSIS

locate [_d path] [--database=path] [--version] [--help] pattern...

DESCRIPTION

This manual page documents the GNU version of locate. For each given pattern, locate searches one or more databases of filenames and displays the filenames that contain the pattern. Patterns can contain shell-style meta characters: *, ?, and []. The meta characters do not treat / or . specially. Therefore, a pattern foo*bar can match a filename that contains foo3/bar, and a pattern *duck* can match a filename that contains lake/.ducky. Patterns that contain meta characters should be quoted to protect them from expansion by the shell.

If a pattern is a plain string—it contains no meta characters—locate displays all filenames in the database that contain that string anywhere. If a pattern does contain meta characters, locate only displays filenames that match the pattern exactly. As a result, patterns that contain meta characters should usually begin with a * and will most often end with one as well. The exceptions are patterns that are intended to explicitly match the beginning or end of a filename.

The filename databases contain lists of FILES that were on the system when the databases were last updated. The system administrator can choose the filename of the default database, the frequency with which the databases are updated, and the directories for which they contain entries; see updatedb(1L).

OPTIONS

_d path, --database=path Instead of searching the default filename database, search the filename databases in path, which is a colon-separated list of database filenames. You can also use the ENVIRONMENT variable LOCATE_PATH to set the list of database FILES to search. The option overrides the ENVIRONMENT variable if both are used.
The filename database format changed starting with GNU find and locate version 4.0 to allow machines with different byte orderings to share the databases. This version of locate can automatically recognize and read databases produced for older versions of GNU locate or UNIX versions of locate or find.
--help Print a summary of the OPTIONS to locate and exit.
--version Print the version number of locate and exit.

ENVIRONMENT

LOCATE_PATH Colon-separated list of databases to search

SEE ALSO

find(1L), locatedb(5L), updatedb(1L), xargs(1L),

Finding FILES (online in info, or printed)

logger

logger—Make entries in the system log

SYNOPSIS

logger [-is] [-f file] [-p pri] [-t tag] [message ...]

DESCRIPTION

logger provides a shell command interface to the syslog(3) system log module.

Previous | Table of Contents | Next