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
497 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

752 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