Linux bulk download pictures, download the entire directory of pictures

Source: Internet
Author: User
Tags egrep

To download all the images of this site directory, there are some mobile wallpaper. The URL of each picture is only a different file name.

The Curl command does not work in this, and its regular match applies only to the file name of the rule, such as the Foo1,foo2,foo3.....,curl command requires that each URL be deterministic.

Using the wget command alone, Wget-r-np-nd all the files in the download directory failed, prompting no description, do not know what the reason.


A good way to do this is to use a CLI-based browser such as lynx or links to dump the URLs of all the images and then download them in conjunction with wget.

The command is as follows:

Lynx-dump http://rom.ligux.com/wallpaper/| Egrep-o "Http:.*jpg" | Xargs-n1 wget
The Lynx Dump option generates the address of each link, Egrep filters out the address of all images, wget downloads all images



Reference


Linux bulk download pictures, download the entire directory of pictures

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.