Implement Linux and Windows file transfer

  
        \tOne. Overview

This article describes how to transfer files between Linux hosts and Windows hosts. Because sometimes, some files in the Linux host may be used in the windows environment. For example, grab some pictures in the Linux host and want to transfer them to the Windows host as an illustration of the Word document. Or online from the Windows host, downloaded some linux packages, want to pass to the Linux host to install. In these cases, a method is needed to interoperate between the two. In this paper, ftp

way to transfer files, the software uses Serv-U. Install Serv-U under the widows host to make it an FTP server. Upload and download files via FTP commands under the Linux host. After testing, it can meet the needs very well.

II.

experimental environment topology follows:


FIG 1

Software Environment:

A machine:

OS: Windows2000, IP : 10.18.34.115.

B:

Operating System: Linux Red Hat 9.0, IP: 10.18.34.251.

III.

1. Serv-U installation

execute setup.exe, all selected by default option.

2. General settings of Serv-U

After the installation is complete, the configuration wizard dialog box will pop up. Here you can fill in the corresponding information as required to configure an FTP server. Here, the IP address of the A machine is 10.18.34.115. Follow the installation wizard to do the following:

1) IP address: Enter "10.18.34.115". (This is empty if you use a dynamic or no legal IP address).

2) Domain name (domain name): Enter the domain name, such as "RoseRed" (here arbitrarily).

3) Install as system server (install as a system server): Select "Yes".

4) Allow anonymous Access: You can choose according to your needs, such as "Yes".

5) anonymous home directory (anonymous home directory): Here you can enter (or select) a home directory for anonymous user login.

6) Lock anonymous users in to their home directory (ie lock the user in the home directory just selected): whether to set the home directory of the previous step to the user's root directory; generally select "Yes ".

7) Create named account: Here, ask whether to establish a normal login user account; generally select "Yes".

8) Account login name (user login name): General user account name, such as input "yint".

9) PassWord: Set the user password. Since the entered password is displayed in plain text (not *), it is only lost once.

10) Home directory: Enter (or select) the user's home directory, such as "E:\\" (this article will operate on the file on E:\\).
< BR> 11) Lock anonymous users in to their home directory: Select "Yes".

12) Account admin privilege (privilege account management): General use its default value of "No privilege" (the general account).

13) Finally select "Finish" to complete the settings, as shown below:
Figure 2
As can be seen from the above figure, an FTP server has been set up, the server address For "RoseRed", there are two users, one is anonymous user "Anonymous", its password is empty; one is the ordinary user "yint", its password is the content entered in the wizard. Permissions

3. Serv-U is provided such

select "yint" user in the left panel, arranged below the window appears in the right panel. Select the "Dir Access" tab to set whether the user has "Read", Write, and Write to the file in its home directory (here "E:\\"). , "Append" (write and add), "Delete", "Execute" (execute) permissions; whether the directory has "List" (display a list of files and directories), "Create" (create a new directory) and "Remove" (modify directory, including delete, move, rename) permissions and so on.

can be set as needed, generally select Read, Write.

IV used in the Linux command

FTP server FTP connection

1. Format: FTP [hostname ip-address]

a) in Linux Enter in the command line: FTP 10.18.34.115

b) The server asks for your username and password, enter yint and corresponding password respectively, and you can pass the authentication.

2. Download the file

download files usually get and mget these two commands.

a) get

Format: get [remote-file] [local-file]

Transfer files from the remote host to the local host.

To get E:\ ose\\1.bmp on the server,

FTP> get /rose/1.bmp 1.bmp (Enter)

b) mget < BR>
Format: mget [remote-files]

Receive a batch of files from the remote host to the local host.

To get all the E:\ ose\\ on the server File,

FTP> cd /rose

FTP> mget *.* (Enter)

Note: The files are downloaded to the current directory of the Linux host. For example, if the FTP command is run under /root/yint, the files are downloaded to /root/yint.

3.Upload file

a) put

Format: put local-file [remote-file]

Transfer a local file to the remote In the host.

If you want to transfer the local 1.bmp to the remote host E:\ ose, and rename it to 333.bmp

FTP> put 1.bmp /rose/333. Bmp (carriage return)

b) mput

Format: mput local-files

Transfer a batch of files from the local host to the remote host.

To upload all bmp files in the local current directory to the server E:\ ose

FTP> cd /rose (carriage return)

FTP> mput *.bmp (Enter) < BR>
Note: The uploaded files are all from the current directory of the host. For example, if the FTP command is run under /root/yint, only the file Linux under /root/yint will be uploaded to the server E:\ ose.

4. Disconnect

bye: Interrupt the connection with the server.

FTP> bye (Enter)

Copyright © Windows knowledge All Rights Reserved