SFTP command list for query. sftp command list

Source: Internet
Author: User
Tags symlink

SFTP command list for query. sftp command list

Available commands:

ascii Set transfer mode to ASCII
binary Set transfer mode to binary
cd path Change remote directory to 'path'
lcd path Change local directory to 'path'
detail remote-path Display system information about remote
                                 file or folder
ldetail local-path Display system information about local
                                 file or folder
chgrp group path Change group of file 'path' to 'group'
chmod mode path Change permissions of file 'path' to 'mode'
chown owner path Change owner of file 'path' to 'owner'
exit Quit sftp
help Display this help text
include filename Include commands from 'filename'
                                 Alternate: <filename
get [-r] [-a | -b] remote-path Download file
                                 -r downloads directory recursively
                                 force ascii (-a) or binary (-b) mode
ln [-s] existingpath linkpath Hardlink / symlink remote file
ls [options] [path] Display remote directory listing
lls [options] [path] Display local directory listing
mkdir path Create remote directory
lmkdir path Create local directory
mv oldpath newpath Move remote file
lmv oldpath newpath Move local file
open [user @] host [: port] Connect to remote host
put [-r] [-a | -b] local-path Upload file
                                 -r uploads directory recursively
                                 force ascii (-a) or binary (-b) mode
pwd Display remote working directory
lpwd Print local working directory
quit Quit sftp
rename oldname newname Rename remote file
lrename oldname newname Rename local file
rmdir path Remove remote directory
lrmdir path Remove local directory
rm path Delete remote file
lrm path Delete local file
su username Substitutes the current user
                                 This is only supported with VShell for
                                 Windows 3.5 or later.
type [transfer-mode] Display or set file transfer mode
view remote-path Download and open file
version Display protocol version

Available commands:

cd path change remote directory to "path"
lcd path change local directory to "path"
chgrp group path changes the group of the file "path" to "group"
chmod mode path changes the permissions of the file "path" to "mode"
chown owner path changes the owner of the file "path" to "owner"
exit exit sftp
help show this help text
get remote path download file
ln existingpath linkpath symlink remote file
ls [options] [path] display remote directory list
lls [options] [path] display local directory list
mkdir path to create a remote directory
lmkdir path to create a local directory
mv oldpath newpath move remote files
open [user @] host [: port] connect to remote host
put local path upload file
pwd show remote working directory
lpwd print local working directory
quit sftp
rmdir path remove remote directory
lrmdir path remove local directory
rm path delete remote file
lrm path delete local file
symlink existingpath linkpath
version shows the protocol version 

 


How to Use sftp commands in linux

Press enter to enter the password. Enter the prompt sftp. If you log on to a remote machine, you need to modify some files on the remote host instead of uploading and downloading files. Can ssh fyt@202.206.64.33 (in fact, sftp is a program of ssh .) Sftp get/var/www/fuyatao/index. in php/home/fuyatao/, the index is stored in the/var/www/fuyatao/directory of the remote host. download php to the local/home/fuyatao/directory. Sftp put/home/fuyatao/downloads/Linuxgl.pdf/var/www/fuyatao/This statement uploads the linuxlinuxgl.pdf file in the local/home/fuyatao/downloads/directory to the remote host/var /www/fuyatao/directory. You can use cd to change the path of the local device. You can use LCD to change the path of the local device. You can use commands such as ls rm rmdir mkdir. Similarly, l is used to call the local machine, that is, lls lrm. To exit sftp, use exit, quit, or bye. For details, refer to man sftp. If it is not convenient in command line mode, sudo apt-get install gftp. It is much easier to operate on the GUI.

For linux sftp, after running the following command, the downloaded content is not found in the corresponding folder, which is strange.

You should change the file name to C.

Related Article

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.