Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (18.4k points)

What is the difference between the following commands?

ssh myhostname "command1; command2;...commandn;" 2>/dev/null

ssh myhostname "command1; command2;...commandn;" 

  1. what does 2> mean?
  2. what does /dev/null mean? 

I read the result of this command will be written on the file /dev/null Instead of this console Is it right? 

It seems strange to me that my name of this file is null.

1 Answer

0 votes
by (36.8k points)

The 2> means "redirect standard-error" to a given file.

/dev/null is the null file.

 Anything written to it is discarded. Together they mean

 "throw away any error messages".

To know about Linux join the Linux training

 

Do check out the video below

 

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Nov 29, 2020 in Linux by blackindya (18.4k points)
0 votes
1 answer

Browse Categories

...