Home > Common Problem > What are the common commands for sftp?

What are the common commands for sftp?

coldplay.xixi
Release: 2020-08-22 11:35:49
Original
7996 people have browsed it

Common sftp commands are: 1. pwd looks at the directory of the remote server, which is the default current directory of the sftp server; 2. lpwd looks at the Linux local directory; 3. ls looks at the current directory under the sftp server. ; 4. lls looks in the current directory of linux.

What are the common commands for sftp?

Commonly used commands for sftp are:

1. sftp user@ip

You need to use sftp, of course you have to log in to the sftp server. After executing the above command in the Linux shell, the Linux shell will prompt the user to enter the password. Let's enter the password. In this way, the sftp connection is successfully established.

2. help

After establishing the connection, the $ in the linux shell is programmed sftp>, which is also correct. Now execute the following help to see which commands sftp supports.

3. pwd and lpwd

pwd looks at the directory of the remote server, which is the default current directory of the sftp server. lpwd looks at the linux local directory.

4. ls and lls

ls looks at the stuff in the current directory of the sftp server, and lls looks at the stuff in the current directory of linux.

5. put a.txt

This is to upload the a.txt file in the current directory of linux to the current directory of the sftp server.

6. get b.txt

This is to download the b.txt file in the current directory of the SFTP server to the current directory of Linux.

7. !command

This refers to executing the command command on linux. For example, !ls lists the stuff in the current directory of linux, !rm a. txt is to delete the a.txt file in the current directory of linux.

This command is very useful, because when you enter the command after sftp>, the default value is for the sftp server, so executing rm a.txt deletes the a.txt file on the sftp server, not the local linux a.txt file on.

8. EXIT and QUIT

Exit.

Related learning recommendations: linux video tutorial

The above is the detailed content of What are the common commands for sftp?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template