On 10 Mar 2004, "Borklund, Thomas" <Thomas.Borklund%do.treas.gov@localhost> wrote: > Question: > > How can I "trap" or redirect the stdout results from the scp command to a > file? The scp works fine and displays to the terminal the files being > transferred, %, size ...etc but I can't get this information into a log > file. > > i.e. > scp "source file" "server":"target directory" 2>&1 > script.log I don't think this is on-topic for this list, but anyhow: openssh-3.7 only displays the progress meter if stderr is a tty (a terminal). If you redirect it, the progress display is turned off. You could try running it under expect, pexpect, or GNU screen, and using those programs to capture the output. Alternatively just run it without progress and look at the destination file with ls -l. -- Martin
Attachment:
signature.asc
Description: Digital signature