Skip to content

Instantly share code, notes, and snippets.

@azet
Last active February 8, 2023 00:41
Show Gist options
  • Save azet/55a8ec3d2576bf2844463a61e5624382 to your computer and use it in GitHub Desktop.
Save azet/55a8ec3d2576bf2844463a61e5624382 to your computer and use it in GitHub Desktop.
wget download all files from one directory without following links etc.

Recursively download all data within a directory (e.g. images, documentation,..)

..without following links like the index pages ../ or sub-directories
if you want to include sub-directories, change the -l option to >1, depending on how deep you want to follow the paths.

Example:

wget -r -c -np -l1 https://memory.loc.gov/master/mbrs/recording_preservation/manuals/

The URL in the example contains: Library of Congress recording preservation manuals - mostly PDF files on audio (legacy, analog) engineering/equipment; Consoles, Compressors, Pre-amplifiers, Recorders, everything you can imagine from the analog age - that's very en vouge right now in the recording scene/industry.

Options/Parameters explained:

You may want to add an alias for that in your ~/.bashrc, ~/.zshrc.local or whatever shell you prefer -- e.g. alias dlrec .. or wget-dir etc.

enjoy.

azet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment