I understand that this command attempts to write to nowhere or a null device but what does
2>&1 mean here?
wget -q -O - http://yourwebsite.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
2 refers to the second file descriptor of the process, i.e.
> means redirection.
&1 means the target of the redirection should be the same location as the first file descriptor, i.e.
> /dev/null 2>&1 first redirects
/dev/null and then redirects
stderr there as well. This effectively silences all output (regular or error) from the
::edit:: Here is an excellent quick reference for you.