Can anyone explain to me in layman terms what this does?
/usr/sbin/ping www.yahoo.com > /dev/null 2>&1
ping - sends a message to the ping server on the webserver www.yahoo.com and receives back a response message.
Normally the ping program displays output noting whether the message made it there and back and how long it took.
The ">/dev/null" is redirecting the normal output (standard output) to a device called "/dev/null" which basically means that the output is thrown away.
Instead of displaying on the screen, the output is not displayed and it is not saved anywhere.
The "2>&1" is causing the error output to go to the same place as "standard output". In this case, error output is also being thrown away.
So basically, this command is sending ping messages to www.yahoo.com but not displaying any output to report what it does.
Do you have a UNIX Question?
Unix Home: Unix System Administration
Hints and Tips