Topic: question about standard error redirection

I have a problem. when I try to look for lynx using the find command, it gives me an error... the command I use is:  find / -name "lynx" -print 2> /dev/null


the error I get is "find: 2: unknown option.    I tried asking my teacher and he doesn't know. I'm the only on in the class who is willing to use FreeBSD.

  thank you


*****!!!!****Never mind, I got it to work. Apparently it doesn't like csh.  I didn't realize I was in it, thought it was BASH.

Last edited by madlarkin (2007-10-03 22:15:13)

Nobody is innocent, there are merely varying degrees of guilt.

Re: question about standard error redirection

depends on shell, for csh i got the same error, for sh, search is going ok, do it that way:
% sh -c 'find / -name "lynx" -print 2> /dev/null'

"religions, worst damnation of mankind"
[color=Blue]Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for

Re: question about standard error redirection

You can't redirect stderr alone in csh. So maybe find thought it was a mistyped option.

Last edited by arun (2007-10-05 19:56:03)

Keep Smiling

Re: question about standard error redirection

ok. Thank you for the help.

Nobody is innocent, there are merely varying degrees of guilt.

Re: question about standard error redirection

Use ZSH

Re: question about standard error redirection

lol, very helpful gatz.

Re: question about standard error redirection

Yes that is smile