How can i download or clone a copy of all the folders and its sub directories from an ftp without the files themselves?

1 Answer 1


There is a spider option in wget that will skip the files and only create the directories:

wget --recursive --spider ftp://$source

The command man wget is usually a good resource for this kind of thing, but is rather unclear when describing this particular option (saying something about how this makes wget behave like a web spider to check if a file exists without downloading it).

In contrast, the command wget --help is very helpful, and for the --spider command it says:

don't download anything

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .