Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 4 down vote accepted

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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