Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 500
  • Last Modified:

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.... ?
0
acameron
Asked:
acameron
  • 2
1 Solution
 
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
 
eeBlueShadowCommented:
> 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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now