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
495 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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 dynamically set the form action using jQuery.

820 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