In this article, we will see how to use the WGET network utility to download many types of files from a web page via the terminal.

Get Started

Launch the terminal and issue this command to download, for example, PDF files from a web page:

 wget --reject html,htm --accept pdf -rl1 URL

Note: Replace URL with web page URL you want to download files from.

To download archive files (rar, zip, etc.) from a web page, then issue this command:

  wget --reject html,htm --accept zip -rl1 URL

To download exe files, issue this command:

 wget --reject html,htm --accept exe -rl1 URL

To download many types of files at the same time, then use this command:

 wget --reject html,htm --accept pdf,zip,rar,exe -rl1 URL 

File extensions must be separated by a comma.

That's it.

Post a Comment