> /dev/null
redirects standard output (stdout
) to /dev/null
, which discards it.
2>&1
redirects standard error (2
) to standard output (1
), which then discards it as well since standard output has already been redirected.
shell – What is /dev/null 2>&1? was last modified: April 4th, 2021 by