find can"t redirect my output to a file

find can"t redirect my output to a file

am 05.11.2007 18:39:13 von cozzmo1

$ 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

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

am 05.11.2007 19:33:14 von Cyrus Kriticos

cozzmo1@hotmail.com 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)

Which OS?

try:

$ find / -name "*assw*" -print >/tmp/file1

Are there any errors beside "Permission denied"?

--
Best regards | Be nice to America or they'll bring democracy to
Cyrus | your country.

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

am 05.11.2007 19:38:42 von Michael Tosch

cozzmo1@hotmail.com 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

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

am 07.11.2007 13:36:04 von cozzmo1

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

---------

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
------

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

am 07.11.2007 15:12:08 von Scott McMillan

On Wed, 07 Nov 2007 04:36:04 -0800, cozzmo1@hotmail.com wrote:

>On Nov 5, 1:38 pm, Michael Tosch
>wrote:
>> cozz...@hotmail.com wrote:

>
>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
>------

What OS/find are you using? Your first example works fine for me
using GNU find 4.2.31 in Slackware and the find in SCO Openserver.


Scott McMillan

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

am 07.11.2007 15:18:21 von claird

In article <1194438964.279834.134210@57g2000hsv.googlegroups.com>,
wrote:
>On Nov 5, 1:38 pm, Michael Tosch
>wrote:
>> cozz...@hotmail.com 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
>
>---------
>
>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
.
.
.
I don't understand the question.

Within /bin/bash, for example, if I command
find /* -name "*assw*" -print 2>/dev/null > $SOMEFILE
I get the result I expect: $SOMEFILE fills up with lines of
filenames which contain "assw".

I don't see what this has to do with Tcl, where this has been
cross-posted, nor can I reproduce the non-results you describe
for "... >> file1" and so on.

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

am 07.11.2007 16:26:24 von Bill Marcum

["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

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

am 08.11.2007 19:15:51 von cozzmo1

-------
I am using bash, I can do csh, but with either shell..

That works more or less, but without the "2> /dev/null" then the
output has all the errors. (Below)
and as long as I am redirecting the errors to "/dev/null" I can't seem
to also redirect them to a file.


host01% find /* -name "*assw*" -print >& file1

host01% more file1
find: cannot read dir /apps/lost+found: Permission denied
find: cannot read dir /apps/Spectrum/lib/SDPM: Permission denied
find: cannot read dir /apps/Spectrum/.ssh: Permission denied

-------

On Nov 7, 10:26 am, Bill Marcum wrote:
> ["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'tredirectit 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

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

am 13.11.2007 04:54:54 von Maxwell Lol

cozzmo1@hotmail.com writes:

> host01% find /* -name "*assw*" -print >& file1


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