I have few pdf links from various websites. example:
How I can wget that link so 1.pdf is downloaded in /example.com/excel/1/ directory. Can wget auto create the directory path without manually creating or defining that path in wget command?
Yes you can. You can with the switch O And do the desired address
wget -O /path/to/file.ext
Also by order curl Do the same Just instead O Great from O Use small. And in the end you have to repeat this operation for the rest in any way you can, for example if you have numerical naming and the numbers only increase, repeat the command with a simple or a loop