25
July
2023
16:47

Replacing the Wget utility with Wget2 (part 3) - examples

25 July 2023 16:47

Examples of using Wget2.

  1. Download the entire web page (with pictures, scripts, styles) for offline viewing

wget2 -p -H -k -erobots=off https://ra1ahq.blog/

option 2 (option added -K create backup copies of original .orig files):

wget2 -p -H -k -K -erobots=off https://ra1ahq.blog/

  1. Display the server headers that it sends before the content of the web page

wget2 --save-headers http://ra1ahq.blog -O - | awk '/^<.*$/ {exit}{print}'

  1. Display page contents

wget2 -O - -x -q https://ra1ahq.blog/ | less

  1. Display the contents of site.webmanifest

wget2 -O - -x -q https://ra1ahq.blog/site.webmanifest

  1. Display the contents of robots.txt

wget2 -O - -x https://ra1ahq.blog/robots.txt | less

  1. Download all images from the page and save them in one directory

wget2 -p -H -nc -nd https://ra1ahq.blog/muzykalnaya-radiostanciya-augusta-1611-kgc --filter-mime-type=\image/*