[英]how can I get all files including sub directory? (mget -R * Not a regular file / No such file or directory)
I used computer 'A' to remotely access computer 'B'.我使用计算机“A”远程访问计算机“B”。
And I want get all files in directory1 including sub directory at computer 'A'.我想获取目录 1 中的所有文件,包括计算机“A”的子目录。
But when I used mget -R *, that comments were shown (Not a regular file, No such file or directory)但是当我使用 mget -R * 时,会显示注释(不是常规文件,没有这样的文件或目录)
Below, it is a my script.下面是我的脚本。 And it shows comments when I use the script.当我使用脚本时,它会显示注释。
<Script>
#!/bin/sh
HOST='IP'
USER='ID'
PASS='PASSWORD'
ftp -n $HOST << END_SCRIPT
user ${USER} ${PASS}
cd /RootDirectory
prompt
mget -R *
quit
END_SCRIPT
exit 0
<Comments>
user ID PASS
cd /RootDirectory
prompt
Interactive mode off.
mget -R *
directory2: Not a regular file
Directory and files information : Directory1 in RootDirectory / test01.sh ~ test05.sh, Directory2 in Directory1 / test06.sh ~ test07.sh in Directory2目录和文件信息 : Directory1 in RootDirectory / test01.sh ~ test05.sh, Directory2 in Directory1 / test06.sh ~ test07.sh in Directory2
I can't use 'wget'.我不能使用'wget'。 What can I do something?我能做什么? Thanks for help :)感谢帮助 :)
Common ftp
implementations do not support recursive transfers.常见的ftp
实现不支持递归传输。
ftp
.要么您需要在ftp
之上使用一些复杂的 bash 脚本自行实现递归传输。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.