What is the difference between the following commands?
ssh myhostname "command1; command2;...commandn;" 2>/dev/null
ssh myhostname "command1; command2;...commandn;"
-
what does
2>mean? -
what does
/dev/nullmean? I read somewhere that result of command will be write to file/dev/nullinstead of console! Is it right? It seems strange for me that the name of file benull!
2>means “redirect standard-error” to the given file./dev/nullis the null file. Anything written to it is discarded.Together they mean “throw away any error messages”.