• Aucun résultat trouvé

Transferring Files with uucp

Dans le document 's Guide Altos ® System V/386 Release 3.2 (Page 189-194)

Both the uucp and uuto commands can be used to transfer copies of binary and text files between remote UUCP sites. There are advantages and disadvantages to each. The uucp command gives you great flexibil-ity in specifying where on the remote system the transferred file is to be placed. However, uucp syntax can be rather long and complicated. The uuto command, on the other hand, is easy to use. But uuto restricts where you can place the file on the remote system. In addition, retrieving a file sent with uuto is slightly more complicated than retrieving a file sent with uucp.

The uucp command is discussed in this section. The uuto command is discussed in the following section.

Before You Begin

Before you can copy files to remote sites with uucp, you must verify that:

• Your local site is a "dial out" site.

• Your local site "knows" how to call the remote site.

• Your computer has write permission in the directory on the remote name of your computer to be displayed.

Note that you may be able to communicate with a site that does not show read and execute permissions set for·others. Use the I command to exam-ine the file's permissions and the I -d command to examexam-ine the directory's permissions. If the permissions are not correct, enter the fol-lowing commands to set the correct permissions:

chmod OH filename chmod OHX directory

Finally, you must verify that your computer has write permission on the directory on the remote site to which you want to transfer files. Each remote UUCP site has a lusrllibluucplPermissions file. This file specifies the directories on that site from which your computer can read and to which your computer can write. You can only send a file to a directory on a remote site if your computer has write permissions on that directory, as specified on the remote site's lusrllibluucplPermissions file.

By default, most UUCP sites permit calling-in computers to write to their lusrlspoolluucppublic directory. Since there is no way to find out which directories your computer can write to on the remote site, short of con-tacting somebody at the site, the safest thing to do when making a UUCP transfer is to write to lusrlspoolluucppublic. The procedure for doing this is outlined below.

Using uuep

The syntax of the uuep command is similar to the syntax of cp:

uucp [options] src Jomputer!srcJile dest _computer! dest Jile These arguments mean the following:

sre file

dest file

The name of the file that you want to copy.

The name of the computer on which srcJile is located.

The name of the copied file on the receiving computer. Usually, srcyle and des(file are the same.

The name of the computer on which dest yle is located.

There are several different ways to specify the location on the remote ma-chine to which you want to transfer the file. The simplest is the -Idest yle specification. This is also the safest specification, because -Idestyle is expanded to lusrlspoolluucppub/icldestyle, thereby assur-ing that the transfer will succeed.

For example, to send lusrlmarktltransfile on machine} to lusrlspoolluucppub/ic on machine2, enter the following command:

uuep lusr/markt/transfile maehine2!-/transfile

This command creates the file lusrlspoolluucppublicltransfile on ma-chine2.

If lusrlmarkt is your current directory, you can copy transfile to machine2 with the following command:

uuep trans file maehine2!-/transfile

The uuep command works much like the rep command. Files are not copied and sent immediately. Instead, copies are placed in a spool

direc-Note

Since the exclamation mark has special meaning to the C-shell, you must "escape" with a backslash (\) any exclamation marks that appear in a uuep command, if you are using the shell. For a C-shell user, the command above is specified as:

uuep transfile maehine2\!-ltransfile machine} to the lusrlcindy directory machine2. To do so, enter the follow-ing command:

uuep lusr/marktltrans file machine2!1usr/cindy Itransfile Note that, like the rep command, the uuep command can be used to retrieve files from a remote site, in addition to copying files to a remote site. Using the example above, if your local computer is machine2 and you want to send a copy of lusrlmarktltransfile on machine} to the lusrlcindy directory on machine2, enter the following command:

uucp maehinel!1usr/markt/transfile lusr/cindy/transfile machine1 to copy lusrlmarktltransfile to lusrlcindy:

uuep trans file maehine2!-cindy/transfile

The receiving computer expands -cindy to the full pathname of cindy's home directory, creating lusrlcindyltransfile. Again, your computer must have write permission in cindy's home directory in order for this transfer to succeed.

1:1

Indirect Transfers

You might be able to send files to a UUCP site not listed in a uuname list-ing. As an example, suppose that your local computer is connected to a UUCP site named machine2. Suppose also that machine2 is connected to a UUCP site named machine3. You can send Itmpltransfile on your local computer to lusrlspoolluucppublic on machine3. Do so by specifying the full UUCP address relative to your local computer:

uucp Itmp/transfile machine2!machine3! -/transfile

Note that each site name in the command line is followed by an exclama-tion mark. By placing several site names in a uucp command line, you can greatly extend the range of systems to which you can copy files with uucp. This is also true for the uuto and uux commands discussed below.

uucp Options

Several options are available for the uucp command. Some of the most useful are the -m and -n user options.

The -m option sends you mail reporting on the success or failure of the file transfer. The -n user option notifies the user on the machine to whom the files are sent of the file transfer.

Other options are available for use with uucp. Refer to . uucp(C) for a complete list of these options.

Checking the Status with uustat

You can use the uustat command to check on the status of files you copied with uucp. To check on the status of all your uucp jobs, enter the following command:

uustat

Your output looks like the following:

1234 markt machine2 2/19-10:29 2/19-10:40 JOB IS QUEUED

Reading from left to right, the elements of this message are:

This is the user who requested the transfer.

This is the site name of the recipient's com-puter.

This is the date and time the job was queued in the spool directory.

This is the date and time of the uustat request.

This message tells you the status of the job. In this case, JOB IS QUEUED tells you that the job is in the spool directory waiting to be sent.

When the transfer is completed, uustat displays the message: COpy FINISHED, JOB DELETED

uuto [options J source Jzle destination _ computerflogin

The login argument is the login of the user to whom you are sending files.

Before you can send a file with uuto, you must verify that:

• The file has read permission set for others.

• The directory that contains the file has read and execute permis-sions set for others.

Dans le document 's Guide Altos ® System V/386 Release 3.2 (Page 189-194)

Documents relatifs