我是靠谱客的博主 忐忑薯片,最近开发中收集的这篇文章主要介绍SFTP 命令帮助,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

sftp> lpwd
Local working directory: c:
sftp> ls -alt
drwx------ 2 demo users          0 Feb 22 16:37 ..
drwx------ 2 demo users          0 Feb 22 16:37 .
-rw------- 1 demo users        405 Dec 17  2021 readme.txt
drwx------ 2 demo users          0 Oct 19  2020 pub
sftp> get readme.txt d:sftp_readme.txt
Fetching /readme.txt to d:/sftp_readme.txt
/readme.txt                                                                           100%  405     0.6KB/s   00:00
sftp> put d:test.txt sftptest.txt
Uploading d:/test.txt to /sftptest.txt
remote open("/sftptest.txt"): Permission denied
sftp>

ls [-1afhlnrSt] [path]
        Display a remote directory listing of either path or the current
        directory if path is not specified.  path may contain glob(3)
        characters and may match multiple files.

        The following flags are recognized and alter the behaviour of ls
        accordingly:

        -1      Produce single columnar output.

        -a      List files beginning with a dot (‘.’).

        -f      Do not sort the listing.  The default sort order is lexi-
                cographical.

        -h      When used with a long format option, use unit suffixes:
                Byte, Kilobyte, Megabyte, Gigabyte, Terabyte, Petabyte,
                and Exabyte in order to reduce the number of digits to
                four or fewer using powers of 2 for sizes (K=1024,
                M=1048576, etc.).

        -l      Display additional details including permissions and own-
                ership information.

        -n      Produce a long listing with user and group information
                presented numerically.

        -r      Reverse the sort order of the listing.

        -S      Sort the listing by file size.

sftp> help
Available commands:
bye                                Quit sftp
cd path                            Change remote directory to 'path'
chgrp grp path                     Change group of file 'path' to 'grp'
chmod mode path                    Change permissions of file 'path' to 'mode'
chown own path                     Change owner of file 'path' to 'own'
df [-hi] [path]                    Display statistics for current directory or
                                   filesystem containing 'path'
exit                               Quit sftp
get [-afPpRr] remote [local]       Download file
reget [-fPpRr] remote [local]      Resume download file
reput [-fPpRr] [local] remote      Resume upload file
help                               Display this help text
lcd path                           Change local directory to 'path'
lls [ls-options [path]]            Display local directory listing
lmkdir path                        Create local directory
ln [-s] oldpath newpath            Link remote file (-s for symlink)
lpwd                               Print local working directory
ls [-1afhlnrSt] [path]             Display remote directory listing
lumask umask                       Set local umask to 'umask'
mkdir path                         Create remote directory
progress                           Toggle display of progress meter
put [-afPpRr] local [remote]       Upload file
pwd                                Display remote working directory
quit                               Quit sftp
rename oldpath newpath             Rename remote file
rm path                            Delete remote file
rmdir path                         Remove remote directory
symlink oldpath newpath            Symlink remote file
version                            Show SFTP version
!command                           Execute 'command' in local shell
!                                  Escape to local shell
?                                  Synonym for help 

最后

以上就是忐忑薯片为你收集整理的SFTP 命令帮助的全部内容,希望文章能够帮你解决SFTP 命令帮助所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(48)

评论列表共有 0 条评论

立即
投稿
返回
顶部