Linux system upload file and download file command

Source: Internet
Author: User
Tags file copy pscp scp command server port

We use the server are Linux systems, if the use of a remote server, we need to push our code past, here can use the PSCP command.

(a) Upload

PSCP the path to the native file and the file name  of the remote host user name @ Remote Host IP: The directory you want to store

Then enter the remote host user password OK file has been uploaded to the target machine under the specified directory

(b) Download

PSCP Remote Host user name @ Remote Host IP: The directory where the remote host file resides, the   path to the file where the local files are stored

Then enter the user password for the remote host. Ok!

Other

------------------------------------------------------------------

PSCP is a remote file transfer tool with the Putty installation package, similar to the Linux under SCP command, using the following methods:

PSCP and SCP function the same, in WINDOWS use, only one file, it is recommended to put Pscp.exe under C:\WINDOWS\system32, so that can be called anywhere, Mac system please ignore this plan.

The syntax is the same as the SCP, and here are a few useful options.

-P copies the file at the time of the source file creation.

-Q does not display any prompt messages when performing a file copy.

-R Copy Entire directory

-V displays a prompt when copying files.

Usage:

PSCP [Options] [[Email Protected]]host:source target

PSCP [options] source [source ...] [[Email Protected]]host

PSCP [Options]-ls [email protected]:filespec

Usage:

PSCP [Options] [user name @] Host: source File destination File

PSCP [Options] source file [source file ...] [user name @] Host

PSCP [options]-LS user name @ host: File space?

Options:

Options:

-P Preserve file attributes protect files Properties

-Q Quiet, don ' t show statistics quiet, don't show stats

-r Copy Directories recursively copy subfolders

-V Print version information and exit display information

-V Show verbose messages

-load sessname load settings from saved session

-load loading, loading save section settings

-p Port Connect to specified port

-p port, connecting to the specified space port

-l user connect with specified username

-l user, connecting space with the specified user

-PW PASSW Login with specified password

-PW password, log in space with the specified password

-1/-2 forced SSH to use the version

-4-6 force use of IPv4 or IPV6

-C Open Compression

-I key key, certificate with key file

-batch Turn off interactivity, maybe

-unsafe unsafe, allows the servo-side to replace characters (dangerous)

Common methods:

1. Transfer local file files to Linux server/root/

C:\>pscp.exe file 192.168.32.50:/root/

It will prompt you to enter your password, just like using SCP under Linux.

"Note" Here PSCP will use your Windows login username, so you may need to specify a Linux user name.

C:\>pscp.exe file [email protected]:/root/

Or

C:\>pscp.exe-l Root File 192.168.32.50:/root/

"Note" Here "-L root" before file

2, the local directory dir, file files transferred to the Linux server/root/, and specify the server port 2009

C:\>pscp.exe-p 2009-r dir file [email protected]:/root/

3. Retrieve the/root/file file on the server to the local current directory

C:\>pscp.exe [email protected]:/root/file.

4. Retrieve the local "C:\My documents\data\" directory from the/root/dir directory on the server

C:\>pscp.exe-r [email protected]:/root/dir "C:\My documents\data\"

Linux system upload file and download file command

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.