Linux下sftp,下載整個目錄文件
1. 網(wǎng)上看了很多get -r可我就是報(bào)錯就是不行
2. 可用命令
首先使用version
命令查看sftp版本,以防版本不同導(dǎo)致的差異:
那么接下來我們就要自力更生,輸入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文章來源:http://www.zghlxwxcb.cn/news/detail-569810.html
嘗試命令1:get -p basic_data
失敗 ×
嘗試命令2:get -p basic_data/.
失敗 ×
嘗試命令3:get -p basic_data/*
成功√
文章來源地址http://www.zghlxwxcb.cn/news/detail-569810.html
到了這里,關(guān)于Linux下sftp,下載整個目錄文件的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!