Re: redirecting stdin and stdout to a file
- From: "Icarus Sparry" <usenet@xxxxxxxxxxxxxxxxx>
- Date: 27 Sep 2006 10:19:34 GMT
On Wed, 27 Sep 2006 02:32:02 -0700, robannexs wrote:
hi,
i've been trying to redirect stderr and stdout to a file,
i ran these command,
dd if=/dev/null of=/dev/null &pid=$!
kill -USR1 $pid > abc.txt 2>&1
somehow i still manage to get the output on screen;
19755503+0 records out
10114817536 bytes (10 GB) copied, 122.91 seconds, 82.3 MB/s
i have also tried directing only the stdout to a file, and only stderr
to a file, with both bearing similar results as above. why is it so? is
there somethign else that will print to screen other than these 2?
thanks in advance and best regards,
jackson
Curious kind of /dev/null you have, most people have one which has nothing
in it.
What you are doing is starting 'dd' in the background, then sending it a
signal. You are redirecting the output of the 'kill' command.
What you probably want is
dd if=/dev/zero of=/dev/null 2>abc.txt & pid=$!
kill -USR1 $pid
.
- References:
- redirecting stdin and stdout to a file
- From: robannexs
- redirecting stdin and stdout to a file
- Prev by Date: redirecting stdin and stdout to a file
- Next by Date: Re: Grep can find a pattern in a text, but not in a file
- Previous by thread: redirecting stdin and stdout to a file
- Next by thread: Re: redirecting stdin and stdout to a file
- Index(es):
Relevant Pages
|