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 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

SAP爱好者

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值