• Keine Ergebnisse gefunden

NE'IWORK USAGE

Im Dokument ROS Utility (Seite 34-38)

The following sections discuss the user interface to the network and give examples of command usage.

Name Space

In order to reference files on remote systems, they must be uniquely identified. The notation has several defaults to allow the reference to be compact. Some restrictions are placed on path-names to prevent security violations. For example, pathpath-names may not include " .. " as a com-ponent because it is difficult to determine whether the reference is to a restricted area.

Naming Conventions

Uuep uses a special syntax to build references to files on remote systems. The basic syntax is system-name !pathname

where the system-name is a system that uucp is aware of. The pathname part of the name may contain any of the following:

1. A fully qualified pathname such as mh tsa! /usr /you/file

The pathname may also be a directory name as in mhtsa!/usr/you/directory

2. The login directory on a remote may be specified by use of the - character. The combina-tion -user references the login directory of a user on the remote system. For example,

mhtsa! -adm/file expands to

mhtsa!/usr/sys/adm/file

if the login directory for user adm on the remote system is /usr/sys/~

3. The public area is referenced by a similar use of the prefix -/user preceding the pathname.

For example,

mhtsa! -/you/file expands to

mhtsa!/usr/spooljuucppublic/you/file if /usr/spool/uucp is used as the spool directory.

Utility Guide UUCP 4. Pathnames not using any of the combinations or prefixes discussed above are preflxed

with the current directory (or the login directory on the remote). For example, mhtsa!file

expands to

mhtsa!/usr/you/flle.

The naming convention can be used in reference to either the source or destination file names.

Forwarding

Although uucp does not allow specification of multiple sites, the uusend(l) command does.

Uusend sends a flle to a given location on a remote system. The system need not be directly connected to the local system, but a chain of uuep(l) links needs to connect the two systems.

For example:

uusend file hplabs! ucbbach! file

Types of 'Transfers

Uucp has a flexible command syntax for file transmission. The following are examples of different combinations of transfers.

Transmissions of Files to a Remote

Any number of files can be transferred to a remote system via uucp. The syntax supports the

*, ? and [ .. ] metacharacters. For example, uucp *.[ch] mhtsa!dir

transfers all files whose name ends in c or h to the directory dir in the users login directory on mhtsa.

Forwarding may be done by uusend; otherwise the syntax is the same.

Fetching Files From a Remote

Files can be fetched from a remote system in a similar manner. For example, uucp mhtsa!*.[ ch] dir

fetches all files whose name ends in c or h from the users login directory on mhtsa and places the copies in the subdirectory dir on the local system.

Switching

Transmission of files can be arranged in such a way that the local system effectively acts as a switch. For example,

uucp mhtsb!files mhtsa!filed

fetchs files from the user's login directory on mhtsb, renames it as filed, and places it in the login directory on mhtsa.

Broadcasting

Broadcast capability (that is, copying a file to many systems) is not offered by uuep. But it can be simulated by a shell script:

for i in mhtsa mhtsb mhtsd do

uucp file $i!broad . done

Unfortunately, one uuep command is spawned for each transmission so that it is not possible to track the transfer as a single unit.

Remote Executions

The remote execution facility allows commands to be executed remotely. For example, uux "!diff mhtsa!/etc/passwd mhtsd!/etc/passwd> !pass.diff"

executes the command diff( 1) on the password file on mhtsa and mhtsd and places the result in pass.diff.

Spooling

Normally uuep copies its source files to the spool area before beginning transmission. This allows you to continue modifying a file without affecting the transmitted copy. You can specify to uuep that it should not do this copy by use of the -e option. For example, the following command will send the file work from the current directory when connection is established with mhtsa.

uucp -c work mhtsa! - /you/work

Utility Guide UUCP

Notification

The success or failure of a transmission is reported to users via the mail( 1) command. The choices for notification are:

1. Notification returned to the requesters system (via the -m option). This is useful when the requesting user is distributing files to other machines. Instead of logging onto the remote machine to read mail, mail is sent to the requester when the copy is finished.

2. Uux( 1) always reports the exit status of the remote execution. Status information is appended to the /usr/spool/uuep/LOGFILE file.

Job Control

Jobs are controlled in the following ways.

Requeuing a Job

Uuep clears its working area of jobs regularly (usually every 72 hours), to prevent a buildup of jobs that cannot be delivered. The -r option forces the date of a job to be changed to the current date, thereby lengthening the time that uuep attempts to transmit the job. The-r option does not impart immortality to a job; it only postpones deleting the job during house-keeping functions until the next cleanup.

Network Names

Users may find the names of the systems on the network via the uunam.e( 1) command. Only the names of the systems in the network are printed.

Network Status

Uulog(l) prints information about completed work done for a specific system or a specific user.

Uulog -u user prints all information regarding work done for that user since the last time the uuep log file (/usr/spool/uucp/LOGFILE) was cleared. Similarly, uulog -s system prints all . information regarding work done for that system.

Uusnap( 1) prints information about pending work. For each system that either has files spooled or commands ready for remote execution, a line is printed. For example,

hplabs 2cmd 3data 2xqt locked ucbbach lcmd

Im Dokument ROS Utility (Seite 34-38)