> # 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
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:
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
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
> 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
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
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.
>>
> 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
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]
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
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:
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 >
12 matches
Mail list logo