wget - Download a sub directory

后端 未结 3 1653
鱼传尺愫
鱼传尺愫 2020-12-23 11:47

How do I download only a sub directory using wget? Can I specify the subdirectory that I need to download?

Thanks!

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-23 12:07

    You can do:

    wget -r -l1 --no-parent http://www.domain.com/subdirectory/

    where:

    -r: recursive retrieving
    -l1: sets the maximum recursion depth to be 1
    --no-parent: does not ascend to the parent; only downloads from the specified subdirectory and downwards hierarchy
    

提交回复
热议问题