I'm trying to ftp a folder using the command line ftp client, but so far I've only been able to use 'get' to get individual files.
相关问题
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- Error building gcc 4.8.3 from source: libstdc++.so
- Why should we check WIFEXITED after wait in order
- Null-terminated string, opening file for reading
wget -r ftp://url
Work perfectly for Redhat and Ubuntu
Use WGet instead. It supports HTTP and FTP protocols.
Good Luck!
reference: http://linux.about.com/od/commands/l/blcmdl1_wget.htm
toggle the prompt by PROMPT command.
Usage:
You could rely on wget which usually handles ftp get properly (at least in my own experience). For example:
You can also use
-m
which is suitable for mirroring. It is currently equivalent to-r -N -l inf
.If you've some special characters in the credential details, you can specify the
--user
and--password
arguments to get it to work. Example with custom login with specific characters:EDIT As pointed out by @asmaier, watch out that even if
-r
is for recursion, it has a default max level of 5:If you don't want to miss out subdirs, better use the mirroring option,
-m
:There is 'ncftp' which is available for installation in linux. This works on the FTP protocol and can be used to download files and folders recursively. works on linux. Has been used and is working fine for recursive folder/file transfer.
Check this link... http://www.ncftp.com/