Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.