24

I noticed a script using wget -Y off ...(bunch of stuff)... which I hadn't encountered before.

Looked it up in the man page and in wget --help and found nothing.

But it definitely exists as an option; contrast it with the non-existent option -Z:

# wget -Y
wget: option requires an argument -- 'Y'
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
# wget -Z
wget: invalid option -- 'Z'
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
# wget --help | grep -- -Y
# 

What is this undocumented option?

4
  • It is likewise not documented in the info page at gnu.org/software/wget/manual/wget.html
    – Wildcard
    Oct 12, 2023 at 23:28
  • 2
    UTSL -- Use the Source, Luke!
    – Kaz
    Oct 13, 2023 at 9:13
  • 3
    FWIW, busybox's wget implementation (used, for example, in alpine) still has the option: -Y on/off Use proxy (and it's missing --no-proxy)
    – Geier
    Oct 13, 2023 at 12:34
  • @Geier that's quite relevant as the script I saw using this is a debian installer script (in a foreman provisioning template) that actually runs on busybox. It uses wget -Y off ... to fetch the "finish" script from foreman, that is then run "in-target" (with access to normal non-busybox utilities).
    – Wildcard
    Oct 13, 2023 at 18:41

1 Answer 1

34

A bit of digging turned up the relevant commits:

Apparently -Y is an ancient switch preserved only for backward compatibility, that allows turning the use of a proxy off (or on??).

The modern replacement for -Y off appears to be --no-proxy which is documented in the current manual as:

       --no-proxy
           Don't use proxies, even if the appropriate *_proxy environment variable is defined.
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .