0

In the provisioning part of vagrant guide, there is a command wget -qO- 127.0.0.1 to check if apache is installed property.

Can anyone explain the command more in detail? I dont understand what the -qO- option does. Also, what is the meaning of wget to 127.0.0.1?

Thanks!

revnukev
  • 19
  • 3
heemin
  • 321
  • 3
  • 12

1 Answers1

4

The dash after the O instructs output to go to standard output.

The q option means the command should be "quiet" and not write to standard output.

The two options together mean the instruction can be used nicely in a pipeline.

As far as added 127.0.0.1 as the source of the wget, that is there to make sure you have a local webserver running. Running wget on the commandline is faster than bringing up a browser.

Ray Toal
  • 86,166
  • 18
  • 182
  • 232