Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

ftp directory and contents

Apr 9, 2007 11:39PM PDT

Hi there

I am using ftp on debian to access the content of an ftp site. At the moment I can upload and download files but don't seem to be able to do the same with directory's. Any ideas?

Joe

Discussion is locked

- Collapse -
That depend on 'the ftp client' and...
Apr 9, 2007 11:49PM PDT

If it has such a feature. If you were to read a few pages about FTP you see your answer but you may want to skip to a solution. Try other FTP clients.

Bob

- Collapse -
ftp packs
Apr 9, 2007 11:58PM PDT

any suggestions on a few good ftp packages that can be operated in bash?

- Collapse -
For me the solution was to add more commands.
Apr 10, 2007 12:05AM PDT
- Collapse -
use wget(1) or curl(1) instead
Apr 12, 2007 7:53AM PDT

Are you really trying to get just one directory? Or are you really looking for a directory and all its contents recursively?

If it's the latter, take a look at GNU wget. You probably already have it. Here I am getting everything in directory /bar/baz except directory /bar/baz/junk from host foo.example.net.

wget -r -w 1 -np -H -o ftp-log -nv -X /bar/baz/junk -l 6 \
--ftp-user=me --ftp-password=seekrit ftp://foo.example.net/bar/baz

Read the manpage. It's worth it.