Linux下sftp,下载整个目录文件
1. 网上看了很多get -r可我就是报错就是不行
2. 可用命令
首先使用version
命令查看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 [-P] remote-path [local-path] Download 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 oldpath newpath Symlink remote file
lpwd Print local working directory
ls [-1aflnrSt] [path] Display remote directory listing
lumask umask Set local umask to 'umask'
mkdir path Create remote directory
progress Toggle display of progress meter
put [-P] local-path [remote-path] 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
我们可以看到get的命令后面是-p,并非为-r文章来源:https://www.toymoban.com/news/detail-569810.html
尝试命令1:get -p basic_data
失败 ×
尝试命令2:get -p basic_data/.
失败 ×
尝试命令3:get -p basic_data/*
成功√
文章来源地址https://www.toymoban.com/news/detail-569810.html
到了这里,关于Linux下sftp,下载整个目录文件的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!