Home > Enterprise >  How do I interpret this bash output redirection with '<'?
How do I interpret this bash output redirection with '<'?

Time:12-01

I have this Bash command {java command} > /dev/null 2>/var/log/server.log < /dev/null & and I'm having a hard time understanding what this means.

I know that...

  1. > /dev/null means to stdout to a void
  2. 2>/var/log/server.log sends errors to /var/log/server.log
  3. & means to run in the background

But what is < /dev/null? Also, am I understand the redirection correctly?

CodePudding user response:

< means redirection of stdin, i.e, standard input.

< /dev/null means input source has nothing, and stdin is always EOF.

  • Related