For Programmers: Free Programming Magazines  


Home > Archive > Tcl > November 2007 > Re: find can't redirect my output to a file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: find can't redirect my output to a file
cozzmo1@hotmail.com

2007-11-07, 8:11 am

On Nov 5, 1:38 pm, Michael Tosch <eed...@NO.eed.SPAM.ericsson.PLS.se>
wrote:
> cozz...@hotmail.com wrote:
>
>
>
>
> 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


---------

I am sorry for not being more clear.

find /* -name "*assw*" -print 2> /dev/null

The above gives lots of output, but somehow I can't redirect it to a
file.
the below methods don't work, and file1 remains empty, the "tee"
option gives no output either.

$ find /* -name "*assw*" -print 2> /dev/null >> file1
$ find /* -name "*assw*" -print 2> /dev/null | tee file1

Thanks,
Crzzy1
------

Cameron Laird

2007-11-07, 7:16 pm

In article <1194438964.279834.134210@57g2000hsv.googlegroups.com>,
<cozzmo1@hotmail.com> wrote:
>On Nov 5, 1:38 pm, Michael Tosch <eed...@NO.eed.SPAM.ericsson.PLS.se>
>wrote:
>
>---------
>
>I am sorry for not being more clear.
>
>find /* -name "*assw*" -print 2> /dev/null
>
>The above gives lots of output, but somehow I can't redirect it to a
>file.
>the below methods don't work, and file1 remains empty, the "tee"
>option gives no output either.
>
>$ find /* -name "*assw*" -print 2> /dev/null >> file1
> $ find /* -name "*assw*" -print 2> /dev/null | tee file1

Bill Marcum

2007-11-07, 7:16 pm

["Followup-To:" header set to comp.unix.shell.]
>
> I am sorry for not being more clear.
>
> find /* -name "*assw*" -print 2> /dev/null
>
> The above gives lots of output, but somehow I can't redirect it to a
> file.
> the below methods don't work, and file1 remains empty, the "tee"
> option gives no output either.
>
> $ find /* -name "*assw*" -print 2> /dev/null >> file1
> $ find /* -name "*assw*" -print 2> /dev/null | tee file1
>

Are you using csh or tcsh? If so, try
find /* -name "*assw*" -print >& file1

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com