Книга: Fedora™ Unleashed, 2008 edition

Configure Commands Directed Toward the cdpath

Configure Commands Directed Toward the cdpath

This alias command allows the administrator to provide another name for a directory other than its standard name:

alias <string> <dir>

The alias line applies to only the cd command. This line is particularly useful if a popular directory is buried deep within the anonymous FTP user's directory tree. The following is a sample entry:

alias linux-386 /pub/redhat/7.3/en/i386/

This line would allow the user to type cd linux-386 and be automatically taken to the /pub/redhat/7.3/en/i386 directory.

The cdpath <dir> line specifies the order in which the cd command looks for a given user-entered string. The search is performed in the order in which the cdpath lines are entered in the ftpacess file.

For example, if the following cdpath entries are in the ftpaccess file,

cdpath /pub/redhat/
cdpath /pub/linux/

and the user types cd i386, the server searches for an entry in any defined aliases, first in the /pub/redhat directory and then in the /pub/linux directory. If a large number of aliases are defined, it is recommended that symbolic links to the directories be created instead of aliases. Doing so reduces the amount of work on the FTP server and decreases the wait time for the user.

Оглавление книги


Генерация: 1.953. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз