What is this for 2>/dev/null in curl -s $proxyline $snortrules_url 2>/dev/null | tar xzOf - rules/*.rules rules/*.conf.... ?

What is this for 2>/dev/null in curl -s $proxyline $snortrules_url 2>/dev/null | tar xzOf - rules/*.rules rules/*.conf.... ?
acameronAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
eeBlueShadowConnect With a Mentor Commented:
> filename = standard output redirected to filename
2> otherfile = error messages redirected to otherfile

the 2 doesn't mean anything alone, it's part of the '2>' operator which refers to error output
0
 
eeBlueShadowCommented:
When you run a command line program, by default all the output goes to screen. Output comes in 2 varieties - stdOut which is the 'normal' output and errOut which is the result of any error messages.

You can redirect either of those using the redirection operator >, so
progname > file.txt 2> otherfile.txt
will take the output from progname and put it into file.txt and any error messages will go into otherfile.txt

output redirected to /dev/null is just deleted.

_Blue
0
 
acameronAuthor Commented:
So whats the 2 got to do with anything?
0
All Courses

From novice to tech pro — start learning today.