7

When I did the command :

 wget -r ftp://user:[email protected]/

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

2 Answers 2

9

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’.
6
  • What's happen if you don't know the depth level?
    – dubis
    Feb 19, 2015 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. Feb 19, 2015 at 16:54
  • Why I didn't think alone about :-) I tried wget -m it's worked very fine for me
    – dubis
    Feb 19, 2015 at 18:52
  • @dubis you should reply your question, rather than comment or edit.
    – Archemar
    Mar 4, 2015 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, 2015 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.

You must log in to answer this question.

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