I see many examples for nc, even one in the man page, that says   nc -zv 77.77.77.77 10-30   would report the open ports in the range 10-30. However, on my machine all the closed ports are also reported, so when I use a large range to check if any ports are open I am flooded with "connection refused" messages.  Why is the behavior on my machine different?  Should I simply filter away the verbose outut, or is there a way to let nc report only open ports?
I used following command for port scanning of my machine  nc -zv 192.168.1.1 1-100  but I want to filter only succeeded message from  following output.Hence i used the following command   nc -zv 192.168.1.1 1-100|grep succeeded   But no use, still it shows full output   nc: connect to 192.168.1.1 port 1 (tcp) failed: Connection refused nc: connect to 192.168.1.1 port 2 (tcp) failed: Connection refused nc: connect to 192.168.1.1 port 3 (tcp) failed: Connection refused nc: connect to 192.168.1.1 port 4 (tcp) failed: Connection refused nc: connect to 192.168.1.1 port 5 (tcp) failed: Connection refused nc: connect to 192.168.1.1 port 6 (tcp) failed: Connection refused nc: connect to 192.168.1.1 port 7 (tcp) failed: Connection refused nc: connect to 192.168.1.1 port 8 (tcp) failed: Connection refused nc: connect to 192.168.1.1 port 9 (tcp) failed: Connection refused
How to zip a whole folder using PHP Why is this CW post saying 36% unknown? Looking at         it says "36% unknown". No user by the name of 'unknown' appears in the  ()  What madness is this? Who is this 'unknown' you speak of? Which Ubuntu to use alongside Windows 7? I am about to sell my old desktop PC and I am cautious about some of my sensitive information being available to the purchaser, even after reformatting the hard-drive, using data recovery software.  How can I securely wipe the hard drive so that the data on it cannot be recovered?  Although I specifically want help with my Windows PC, it wouldn't hurt if there were suggestions for Macs as well. How can I make realistic looking potions as handouts If you know the Index, Value or Text. also if you don't have an ID for a direct reference.  ,  and  are all helpful answers.  Example markup  &lt;div class="selDiv"&gt;   &lt;select class="opts"&gt;     &lt;option selected value="DEFAULT"&gt;Default&lt;/option&gt;     &lt;option value="SEL1"&gt;Selection 1&lt;/option&gt;     &lt;option value="SEL2"&gt;Selection 2&lt;/option&gt;   &lt;/select&gt; &lt;/div&gt; Custom setting Setting type not visible Choosing numbers without consecutive numbers. In how many ways can we choose $r$ numbers from $\{1,2,3,...,n\}$,   In a way where we have no consecutive numbers in the set? (like $1,2$) The no. of all possible matrices of order $3\times 3$ with each entry $0$ and $1$ and $ -1$. Calculating polygon area within polygons in QGIS? I am new to QGIS - I want to estimate the area of the reef under a polygon grid. My shapefiles are already in meters, however I am having a hard time calculating the area under the grid layer. Attached are the photos. I want to calculate the total area of the bold black polygons (reefs) under each grid square (image 2). How much reef is inside each square, for example, grid1: 25 sq.km, grid 1 sq.km, etc. Each reef polygon has its corresponding area in the layer attribute table.    ADDITIONAL PHOTO: RED IS THE REEF  THE ATTRIBUTES OF THE REEF LAYER Is my way of solving and my answer correct?  Let $f(x)=x+\frac{x^2}{2}+\frac{x^3}{3}+\frac{x^4}{4}+\frac{x^5}{5}$   And $g(x)=f^{-1}(x)$  Find $g'''(0)$  My attempt:  We know that $g'(x)=\frac{1}{f'(g(x))}$  $f'(x)=1+x+x^2+x^3+x^4=\frac{x^5-1}{x-1}$  $f'(g(x))=\frac{(g(x))^5-1}{(g(x))-1}$  $\Rightarrow g'(x)=\frac{(g(x))-1}{(g(x))^5-1}$  $\Rightarrow g'(x)[(g(x))^5-1]=g(x)-1$  Similarly differentiating again,  $\Rightarrow g'(x)[5(g(x))^4]+[(g(x))^5-1]g''(x)=g'(x)$  Similarly differentiating again,  $\Rightarrow g'(x)[20(g(x))^3g'(x)]+[5(g(x))^4]g''(x)+[(g(x))^5-1]g'''(x)+g''(x)[5(g(x))^4]=g''(x)$  Putting $x=0$,  $g(0)=f^{-1}(0)=0$  $g'(0)=\frac{1}{f'(g(0))}=\frac{1}{f'(0)}=1$  similarly,$g''(0)=-1$  $\Rightarrow g'''(0)=1$ Stupidly, I had been using a condition like this as part of a script:  if [ $(ls FOO* 2&gt; /dev/null) ] # if files named "FOO*" were downloaded  then     echo "Files found"      # ... process and email results else     echo "Not found"     # ... email warning that no files were found (against expectations) fi   That works for zero and one files named FOO*, but fails if there are more than one. From logs I found several different error messages stemming from this:  [: FOO_20131107_082920: unary operator expected [: FOO_20131108_070203: binary operator expected [: too many arguments   My question is: what is the correct way to check, in a Bash if condition, whether one or more files whose name begins with FOO exist?  GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu) This was a question from my textbook. This is how I approached it.   For the first part, you can do c(10,5) so you choose 5 of the 10 to be on a team.   For the second part, you have 10 ways to choose the "best player" and you multiply it by c(10,4) to pick the other 4 players. However, I am not sure how you can exclude the "worst player". Although this sounds subjective, I believe the question is saying that the "best" and "worst" players are distinct, whereas the other players aren't. How to forbid a specific package to be installed? Automatically determine tags while writing a question Can we modify "Ask question" to automatically suggests tags based on your question content.   So instead that user needs to type "team-foundation-server" or "TFS" or "TeamFoundationServer" he will see list of tags auto-populated with ajax which he (or she) can then select and it will be associated with the question. So basically only thing we need is code which will cross-match question content with list of known tags while user is typing and display results in some nice ajax-enabled list/cloud/whatever UI control. This should be separate control for tags suggestions so user still has option to use standard tag list input to type-in tags.  In this case, instead of three (or more) tag variations we would have only one tag for Team-Foundation-Server. What are the differences between Generics in C# and Java... and Templates in C++? I want to do:  int a = 255;  cout &lt;&lt; a;   and have it show FF in the output, how would I do this? Second-order non-linear ODE $2tx'-x=lnx'$  I differentiated both sides with respect to x:  $x'+2tx''=\frac {x''}{x'}$  Substituting $p=x'$,  $p+2tp'=\frac{p'}{p}$  But I have no clue what can I do from here on.  EDIT: $t$ is the non-dependent variable. Explanation on when the possessive should be used instead of an attributive noun How would you explain to a person who is learning English, and whose native language does not have attributive nouns, when the possessive should be used instead of an attributive noun?  In particular, how would you explain it referring to the following list of sentences?   Today's news is bad This week's schedule has been changed Tomorrow's lunch will be at the French restaurant This year's report will be communicated in the reunion room Last summer's vacations were memorable Last year's meetings were a complete disaster How do I install and manage RPMs?