Re: Redirecting STDOUT



At 08:49 AM 12/21/2007, jhall@xxxxxxxxxxxxxx wrote:
I am in the process of debugging a script and I would like to have the
output of stdout redirected to a file.

After reading about redirection on the Internet, I was under the
impression the following would redirect stdout to a file, but I cannot
seem to get it to work.

tar -cvzf root.tgz /root > /dev/null 2>/home/jay/tarlog

I'm sure it is something simple I am doing wrong, but I am not seeing it.

Thanks for your help.

Jay

In your command line above you are redirecting stdout to /dev/null and stderr to your file.

try:

tar -cvzf root.tgz /root > /home/jay/tarlog 2>&1

-Derek

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: natd.conf problem (was: natd problem (but close!) )
    ... >> lose internet access itself since all return traffic will go to the ... You're trying to set up a static nat configuration ... "Address redirection is useful if several IP addresses are available, ... incoming on that particular IP address back to the specific LAN client. ...
    (freebsd-questions)
  • Re: Redirecting external traffic through IIS4 to an internal IIS6 server
    ... IIS cannot act as a reverse proxy, which is what you need for this to work. ... The redirection feature of IIS is just a redirection, ... > I want to redirect internet traffic which hits our IIS4> server to an IIS6 / ASP.NET site which is located> internally on our LAN. ... > from the internet and the IIS6 machine is only available> across our LAN. ...
    (microsoft.public.inetserver.iis)
  • Re: Owa Redirection
    ... Exchange is performing the OWA redirection. ... > From Internet MX records are pointing towards my PIX firewall. ... > If The Internal clients are able to get redirection why not external ...
    (microsoft.public.exchange2000.admin)
  • Internet Security
    ... "The most prevalent attack on the internet is redirection attacks" ... I told him that it is a very hard task. ...
    (comp.security.misc)
  • Re: natd.conf problem (was: natd problem (but close!) )
    ... Subject: natd.conf problem (was: natd problem (but close!)) ... > for a simple address redirection? ... lose internet access itself since all return traffic will go to the internal ... If you have multiple IP's on xl0, redirect one of the aliased IP's ...
    (freebsd-questions)