5

When I did the command :

 wget -r ftp://user:paswword@ftp.xxxx.ovh.net/

It's missing any sub-sub-directories. Does recursive FTP have a limit?

7

How many level deep are you getting? If you need more than 5, you need to provide the -l option.

man wget

-r
--recursive
    Turn on recursive retrieving.    The default maximum depth is 5.

-l depth
--level=depth
    Specify recursion maximum depth level depth.
-m
--mirror 
Turn on options suitable for mirroring. 
This option turns on recursion and time-stamping, 
sets infinite recursion depth and keeps FTP directory listings. 
It is currently equivalent to ‘-r -N -l inf --no-remove-listing’.
  • What's happen if you don't know the depth level? – dubis Feb 19 '15 at 15:46
  • @dubis - just go for a ridiculously large number such as 999 or even 50000. There may well be a limit, but it's probably quite deep. – garethTheRed Feb 19 '15 at 16:54
  • Why I didn't think alone about :-) I tried wget -m it's worked very fine for me – dubis Feb 19 '15 at 18:52
  • @dubis you should reply your question, rather than comment or edit. – Archemar Mar 4 '15 at 9:48
  • @Archemar I didn't understand what're you meaning the answer is "-m" option. Should I post that in my own new answer? – dubis Mar 4 '15 at 10:26
6

The -m option of wget is the unlimited recursion

-m
--mirror 
Turn on options suitable for mirroring. 
   This option turns on recursion and time-stamping, 
   sets infinite recursion depth and keeps FTP directory listings. 
   It is currently equivalent to ‘-r -N -l inf --no-remove-listing’.

Thanks for helping.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.