Operating System - HP-UX
1753916 Members
7960 Online
108810 Solutions
New Discussion юеВ

redirect the output of frecover command

 
satheeshnp
Advisor

redirect the output of frecover command

i was using frecover command in the script to recover the catalog.

frecover -xvf dumplevel* *.gfile

I am trying to redirect the output to some other file..

I dont want any thing(even output or error) in the screen.I have tried various redirection options like >, 2>.Its not working

Kindly help.
8 REPLIES 8
Bijeesh
Respected Contributor

Re: redirect the output of frecover command

Hi,
If you don't want output on screen,remove the -v option and also you can run it this on background.
satheeshnp
Advisor

Re: redirect the output of frecover command

hi,

I want the output to be redirected to a file...

what are the catalogs recoverd and what are not recovered should be redirected to that file..

even though i neglected the -v option ,o/p is showing in the screen
Dennis Handly
Acclaimed Contributor

Re: redirect the output of frecover command

>I have tried various redirection options like >, 2>. It's not working

Can you show what you did? I find it strange that frecover(1m) would go out of its way to write directly to the terminal rather to stdout/stderr.
Bill Hassell
Honored Contributor

Re: redirect the output of frecover command

This should work just fine:


frecover -xvf dumplevel* *.gfile > /dev/null 2>&1

What did you try?


Bill Hassell, sysadmin
satheeshnp
Advisor

Re: redirect the output of frecover command

@above

ya...this command is not showing any o/p in the screen.

But i want to redirect to a file.Redirection to a file is not happening here. Pls help even though it is silly

I am attaching the command log with this.Pls correct me
Bill Hassell
Honored Contributor

Re: redirect the output of frecover command

> frecover -xvf dumplevel* *.gfile > /dev/null 2>&1

Change /dev/null to your desired filename:

frecover -xvf dumplevel* *.gfile > /tmp/frecover.log 2>&1


Bill Hassell, sysadmin
shjn
New Member

Re: redirect the output of frecover command

Hi Satheesh,

For sending stderr and stdout to same file we can use 2>&1. For you command will be

" frecover -xf dumplevel5 -g chennai.gfile 2>&1 /oracle/14Oct10/frecover.out "

where stdout and stderr will get redirected to /oracle/14Oct10/frecover.out
Dennis Handly
Acclaimed Contributor

Re: redirect the output of frecover command

>shjn: For sending stderr and stdout to same file we can use 2>&1.
frecover -xf dumplevel5 -g chennai.gfile 2>&1 /oracle/14Oct10/frecover.out

This isn't valid syntax.

>where stdout and stderr will get redirected to /oracle/14Oct10/frecover.out

You should use:
... > /oracle/14Oct10/frecover.out 2>&1