Why doesn't wget -r get all FTP subdirectories?

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?

Asked By: dubis

||

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’.
Answered By: Mikel

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.

Answered By: dubis
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.