Re: Redirecting STDOUT

2007-12-22 Thread jhall
> # command >& file > > this will redirect both STDERR and STDOUT to file > > -- > Best regards, > Michael mailto:[EMAIL PROTECTED] > > Thank you to everyone for their help. I have this working now. Jay ___ freebsd-questions

Re: Redirecting STDOUT

2007-12-21 Thread Michael Lednev
Hello, jhall. On 21 ??? 2007 ?., 20:34:52 you wrote: jvn> When I run this as a non-root user it works fine. But, when running it as jvn> root, it does not produce the expected results. jvn> $ ls -l /fjdkslafjdl 2>/home/hallja/test2 jvn> And, in the file test2, I see jvn> ls: /fjdkslafjdl:

Re: Redirecting STDOUT

2007-12-21 Thread Dan Busarow
On Dec 21, 2007, at 10:34 AM, [EMAIL PROTECTED] wrote: In that case you only redirecting STDERR to file. As you've been already told STDOUT will be redirected with $ command 1>file or $ command > file adding 2>&1 will also redirect STDERR to this file When I run this as a non-root user

Re: Redirecting STDOUT

2007-12-21 Thread Derek Ragona
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 > When I run the above, I receive the foll

Re: Redirecting STDOUT

2007-12-21 Thread jhall
> In that case you only redirecting STDERR to file. As you've been > already told STDOUT will be redirected with > > $ command 1>file > > or > > $ command > file > > adding 2>&1 will also redirect STDERR to this file > When I run this as a non-root user it works fine. But, when running it as roo

Re: Redirecting STDOUT

2007-12-21 Thread Michael Lednev
Hello, jhall. On 21 ??? 2007 ?., 19:59:27 you wrote: >> Hello, jhall. >> >> On 21 ??? 2007 ?., 17:49:28 you wrote: >> >> jvn> tar -cvzf root.tgz /root > /dev/null 2>/home/jay/tarlog >> >> jvn> I'm sure it is something simple I am doing wrong, but I am not seeing >> it. >> >> what is your

Re: Redirecting STDOUT

2007-12-21 Thread jhall
ld 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. >>

Re: Redirecting STDOUT

2007-12-21 Thread jhall
> Hello, jhall. > > On 21 ??? 2007 ?., 17:49:28 you wrote: > > jvn> tar -cvzf root.tgz /root > /dev/null 2>/home/jay/tarlog > > jvn> I'm sure it is something simple I am doing wrong, but I am not seeing > it. > > what is your shell? > > -- > Best regards, > Michael mai

Re: Redirecting STDOUT

2007-12-21 Thread Michael Lednev
Hello, jhall. On 21 ??? 2007 ?., 17:49:28 you wrote: jvn> tar -cvzf root.tgz /root > /dev/null 2>/home/jay/tarlog jvn> I'm sure it is something simple I am doing wrong, but I am not seeing it. what is your shell? -- Best regards, Michael mailto:[EMAIL PROTECTED]

Re: Redirecting STDOUT

2007-12-21 Thread Girish Venkatachalam
On 14:49:28 Dec 21, [EMAIL PROTECTED] 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 cann

Re: Redirecting STDOUT

2007-12-21 Thread Derek Ragona
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:

Redirecting STDOUT

2007-12-21 Thread jhall
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 >