Re: find can't redirect my output to a file



cozzmo1@xxxxxxxxxxx wrote:
$ find /* -name "*assw*" -print 2> /dev/null

With the above command, how would I redirect the output to a file?

I tried these unsuccessfully
$ find /* -name "*assw*" -print 2> /dev/null >> file1 !(no
output)
$ find /* -name "*assw*" -print 2> /dev/null | tee file1 !(no
output)

thanks,
Crzzy1


Because it does not find anything that matches "*assw*"?
Then it will create an empty file1 or append nothing.

Or it dies with "too many arguments" because /* has too many
matches? The 2>/dev/null suppresses the error message.

Try

find / -print 2> /dev/null | tee file1


--
Michael Tosch @ hp : com
.



Relevant Pages

  • Re: net use script issue with terminal server and DFS
    ... redirect stdout into NUL ... command will be redirected to NUL, ... But it should give you an error message when you execute the same ...
    (microsoft.public.windows.terminal_services)
  • Re: Display Problems
    ... If it shows up in the GUI, it is there, and must be present ... Or issue the command; ... > and got the error message file or folder not found. ... in the midst of the frustration, by all means, vent away. ...
    (alt.os.linux.suse)
  • Re: Display Problems
    ... If it shows up in the GUI, it is there, and must be present ... > get the error message that you, in fact, did get. ... > Or issue the command; ... > in the midst of the frustration, by all means, vent away. ...
    (alt.os.linux.suse)
  • Re: Redirecting lpt1 output to an installed printer
    ... to the lpt1 port. ... I am doing now is to redirect the output using the "net use" ... If there's a recognized printer on that port, ... which I do via a "net use LPT1" command inside a batch file. ...
    (microsoft.public.vb.general.discussion)
  • Re: How to capture "legacy" program output in MSH and redirect them to MshHostUserInterface
    ... command is redirected in the script or not. ... to see if the output of the script command is the default output pipe. ... The workaround is to always explicitly redirect native ... RedirectAlways flag on the runspace that will cause legacy applications to ...
    (microsoft.public.windows.server.scripting)