Common file transfer commands and usage methods in Linux

  

sftp

sftp, Secure Ftp is a file transfer management tool based on SSH security protocol. Because it is based on SSH, it will encrypt the user's password, data and other sensitive information during the transmission process, so it can effectively prevent the user information from being stolen during the transmission process, not only can transfer the file data, but also can carry out remote files. management.

Create a connection: # sftp user@host

Upload the file locally: # put localpath

Download the file: #get remotepath

Corresponds to the remote For local operations, just add ”l” before the command, which is convenient and easy to remember.

Example: lcd lpwd lmkdir

scp

scp is a secure file transfer program based on the SSH security protocol. Unlike sftp, it only provides file transfer between hosts and has no file management capabilities.

Copy local_file to remote directory remote_folder# scp local_file remote_user@host:remote_folder

Copy local_folder to remote remote_folder (requires parameter -r recursion)# scp –r local_folder remote_user@host: Remote_folder

The above command is written in reverse to remote replication to the local

sz/rz

sz/rz is a command based on the ZModem transport protocol. The transmitted data will be checked and has good transmission performance, which is very convenient to use.

Download data to the local download directory: # sz filename1 filename2 …

Upload data to remote: #rz –be

The client will pop up the upload window.

Copyright © Windows knowledge All Rights Reserved