Yep, thanks, and thanks to the others who pointed it out off list too. I
remember learning this some time ago, but excuses I wasn't really even
thinking about that problem, dog burned down, house ran away, I've got a
cold, going to be 40 in another month and my medium term memory is obviously
shot /excuses.
Oh well, on to the fun stuff that I still remember how to fix...
Todd
-Original Message-
From: Martin Pool [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 08, 2000 8:28 PM
To: Todd Robinson
Cc: [EMAIL PROTECTED]
Subject: Re: transfer interrupted, and Not privileged errors,
On 8 Nov 2000, Todd Robinson [EMAIL PROTECTED] wrote:
That's pretty strange, for two reasons: as far as I knew, everything
ought to go to stderr, stdout, or the log file. When you say
"console", do you mean it comes out in your current window, or it goes
to the actual VGA adapter/serial console of the server?
In the current window the rsync was executed from, even if you redirect
stderr someplace else. For instance, I run something just like this:
rsync -avvvz /tmp/rsync-2.4.6/lib fdops3::marktg 21
/rsync.txt
Ah, OK. This is because stderr is not actually redirected!
The construct 21 means ``send fd2 (stderr) to wherever fd1 (stdout)
is pointing *at the moment*''. Since redirections are evaluated in
order left-to-right, this sends stderr to the terminal (probably where
it was already going), and then sends stdout to the file. From the
bash man page:
Note that the order of redirections is significant. For
example, the command
ls dirlist 21
directs both standard output and standard error to the
file dirlist, while the command
ls 21 dirlist
directs only the standard output to file dirlist, because
the standard error was duplicated as standard output
before the standard output was redirected to dirlist.
I still remember the `ah-ha!' moment when this sunk in a few years
ago.
Regards,
--
Martin Pool, Linuxcare, Inc.
+61 2 6262 8990
[EMAIL PROTECTED], http://www.linuxcare.com/
Linuxcare. Support for the revolution.