Maybe I'm missing something, but when I type do a verbose ditto command (ditto [-v] [-V] 2>>some.log
), it will send regular output to stderr
. Therefore, my some.log
file will be filled with entries like copying file ...
.
This doesn't make logical sense to me, but it's what the manual says as well:
-V Print a line of output to stderr for every file, symbolic link, and device copied.
I haven't verified this, but I assume that actual I/O errors are sent to stdout
. My original want was to display regular output, but log all errors. So assuming that errors are sent to stdout
, then this problem isn't really much of a problem - it's just that the semantics don't make sense to me.
So, this should give me the correct outputs:
ditto -V /some/path/ /some/other/path 1>>some.log