I have a script that looks something like this:

ruby foo.rb > log.out 2> error.log < /dev/null &

In this case, i understand that STDOUT is redirecting to log.out and that 2> is redirecting the STDERR file descriptor to error.log. What's confusing me here is what comes after the STDERR redirect to error.log is the < /dev/null except. What exactly is being redirected error.log here, is it STDERR or /dev/null?

1 Answer 1


In this specific case the < indicates INPUT redirection. So the input to the ruby command is coming from /dev/null (i.e. no input).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.