How to download recursively a folder using /usr/bin/ftp and cshell?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to download recursively a folder using /usr/bin/ftp and cshell?
# 1  
Old 05-28-2013
How to download recursively a folder using /usr/bin/ftp and cshell?

Hi, friends,
I am meet a ftp download problem when using cshell and /usr/bin/ftp command.
I want to download recursively a folder dira from FTP server.
Code:
dira ---dira1-----dira2------dira3-----dira4
      |--file11  |--file21    |--file31   |--file41
      |--file12  |--file22    |--file32   |--file42
      |--file13  |--file23    |--file33   |--file43

but It seems like mget * doesn't work very well.

my question is as follows:
1. How to download recursively "dira" into local directory exactly the same as raw content structre located in FTP.
2. because of cshell has no function, so in order to improve my cshell programming ability, I need to use cshell and /usr/bin/ftp not sh, bash, lftp, Wget, ncftp, lftp and so on.

I am looking forward to your help.
Thanks all.
# 2  
Old 05-28-2013
Go up one level and mget the parent dir?

List the dir and create custom get just of files not dirs, saving dirs for later recursive calls?

A cshell script can call itself revursively, so the lack of functions is a minor detail.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to recursively /usr/bin/find only readonly files?

I'm having trouble because, for some reason, cp -R missed a few files. And so did xcopy/s. Since I'm running Cygwin on Win10, I decided to see if robocopy would be more effective. The trouble is someone, maybe xcopy/s or cp -R dutifully set certain files to be read only so when I try a... (6 Replies)
Discussion started by: siegfried
6 Replies

2. BSD

FreeBSD: /usr/bin/ld not looking in /usr/local/lib

I'm not sure if this is the default behavior for the ld command, but it does not seem to be looking in /usr/local/lib for shared libraries. I was trying to compile the latest version of Kanatest from svn. The autorgen.sh script seems to exit without too much trouble: $ ./autogen.sh checking... (2 Replies)
Discussion started by: AntumDeluge
2 Replies

3. Solaris

What is the difference between xpg4/bin and usr/bin?

Hi Experts, I found that the same commands(sort, du, df, find, grep etc.) exists in both dir. What is the difference to use them? i.e: to use xpg4/bin/grep and usr/bin/grep My OS version is SunOS 5.10 Regards, Saps (7 Replies)
Discussion started by: saps19
7 Replies

4. OS X (Apple)

When to use /Users/m/bin instead of /usr/local/bin (& whats the diff?)?

Q1. I understand that /usr/local/bin means I can install/uninstall stuff in here and have any chance of messing up my original system files or effecting any other users. I created this directory myself. But what about the directory I didn't create, namely /Users/m/bin? How is that directory... (1 Reply)
Discussion started by: michellepace
1 Replies

5. UNIX for Dummies Questions & Answers

Alias /usr/bin to /bin in profile

Hi! All the basic linux commands, ie. echo, find, etc, are located in /bin. I have a couple of programs that have these commands pointed towards /usr/bin, ie, /usr/bin/echo (even though the actual 'echo' command is in /bin). How can I alias or redirect or link the /usr/bin to /bin just for this... (6 Replies)
Discussion started by: dancerat
6 Replies

6. Solaris

How do I link ld in /usr/ucb/ to /usr/ccs/bin?

Hi all, below is the problem details: ora10g@CNORACLE1>which ld /usr/ucb/ld ora10g@CNORACLE1>cd /usr/ccs/bin ora10g@CNORACLE1>ln -s /usr/ucb/ld ld ln: cannot create ld: File exists ora10g@CNORACLE1> how to link it to /usr/ccs/bin? (6 Replies)
Discussion started by: SmartAntz
6 Replies

7. Shell Programming and Scripting

FTP command to search recursively in windows folder

Hi what command to be used to FTP files from the windows directory into a folder in unix environment using shell script The script should be able to recursively search into 100 subdirectories within my windows directory for .xml files. Can anyone help me with this... thnx (6 Replies)
Discussion started by: lakshmis10
6 Replies

8. UNIX for Dummies Questions & Answers

Difference between /bin, /usr/bin, /sbin ?

Hi All, Can somebody tell me the difference between /bin, /usr/bin, /sbin ? Thanx in advance, Saneesh Joseph (3 Replies)
Discussion started by: saneeshjose
3 Replies

9. UNIX for Dummies Questions & Answers

/bin/sh: /usr/bin/vi: No such file or directory when doing crontab

I just set up an ftp server with Red Hat 5.2. I am doing the work, I'm baby stepping, but it seems like every step I get stuck. Currently, I'm trying to set up a crontab job, but I'm getting the following message: /bin/sh: /usr/bin/vi: No such file or directory. I see that vi exists in /bin/vi,... (3 Replies)
Discussion started by: kwalter
3 Replies
Login or Register to Ask a Question