简体   繁体   English

如何获取包括子目录在内的所有文件? (mget -R * 不是普通文件/没有这样的文件或目录)

[英]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实现不支持递归传输。

  • Either you will need to implement the recursive transfer on your own using some complex bash script on top of the ftp .要么您需要在ftp之上使用一些复杂的 bash 脚本自行实现递归传输。
  • Or you will have to move to another FTP client.或者您将不得不转移到另一个 FTP 客户端。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 mget否这样的文件或目录 - mget No Such file or directory 在linux中,我怎样才能把zip具体的子目录改成自己的zip文件名,把父目录名和Z78E6221F6393D1356DZF2Z文件全部改成a393D1356DZF21的单目录? - In linux, how can I zip specific sub directories into their own zip files named parent directory name and output them all into a single directory? .txt 文件显示目录和子目录的内容及其所有文件和目录权限 - .txt file shows contents of directory and sub-directories and all of their files and directory permissions 我如何在C中获取目录中的所有文件名而又不获取“。”和“ ..” - how can i get all file name in a directory without getting “.” and “..” in C 如何获取目录中的文件数 - How can I get a count of files in a directory 如何获得Linux目录中每个文件的所有者? - How can I get the owner of every file in a directory in Linux? 如何使用 grep 提取目录和子目录中所有文件中包含的所有 IP 地址? - How can I use grep to extract all IP addresses contained in all the files within a directory and sub-directories? 如何通过*将包括隐藏文件在内的所有文件移动到父目录中 - How to move all files including hidden files into parent directory via * 如何替换目录中所有文件名中的字符串? (具体来说,我需要从目录中的所有文件名中删除“\\#015” - How can I replace a string in all filenames in a directory? (specifically I need to remove “\#015” from all file names in a directory Linux - 有没有办法获取目录的文件大小,但只包括最后修改/创建日期为 x 的文件? - Linux - is there a way to get the file size of a directory BUT only including the files that have a last modified / creation date of x?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM