wget - I can't download files with "?"

Solution 1:

This is probably the filesystem you're downloading to not allowing a filename with "?" in it. Note that the error is "Cannot write".

You can use the --restrict-file-names=windows option to escape names for compatibility with FAT filesystems. (Note that the non-reversible additional %-encoding done by wget is not actually correct vs. web architecture, but you probably don't care.)

You could also use -O <filename> to specify a particular filename if you were downloading only one file.

Solution 2:

The & also commonly causes problems. Try putting the whole url in quotes.

Solution 3:

As suggested by pjc50, please put the URL within quotes when you have special characters in it. Therefore, you should try:

wget -r 2 'http://www.aircrack-ng.org/doku.php?id=tutorial&DokuWiki=78e8249415a9ce232228ed8f9f02b9dd'

When you do not use quotes, the shell, on encountering a &, assumes you want to run the wget job in background.