Solved

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

Posted on 2004-04-29
3
492 Views
Last Modified: 2008-03-03
What is this for 2>/dev/null in curl -s $proxyline $snortrules_url 2>/dev/null | tar xzOf - rules/*.rules rules/*.conf.... ?
0
Comment
Question by:acameron
  • 2
3 Comments
 
LVL 10

Expert Comment

by:eeBlueShadow
ID: 10952052
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
 

Author Comment

by:acameron
ID: 10952399
So whats the 2 got to do with anything?
0
 
LVL 10

Accepted Solution

by:
eeBlueShadow earned 125 total points
ID: 10952775
> 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now