I have a simple script that uses scp to copy some files from one server to another. I want to capture the files that are copied but simple redirection to a file does not work.
So I want to capture this output from the scp command in a log file.
-bash-3.00$ scp -pr /export/jumpstart/Files server2:/export/jumpstart
config.driver 100% |*********************************************************| 1026 00:00
hardening.driver 100% |*********************************************************| 3876 00:00
secure.driver 100% |*********************************************************| 493 00:00
user.init 100% |*********************************************************| 2588 00:00
whole_zone.cfg 100% |*********************************************************| 122 00:00
sparse_zone.cfg 100% |*********************************************************| 276 00:00
sudoers.20071022 100% |*********************************************************| 6142 00:00
sudoers.20071023 100% |*********************************************************| 6142 00:00
sudoers.20071024 100% |*********************************************************| 6649 00:00
sudoers.20071024v1 100% |*********************************************************| 6933 00:00
sudoers.20071026 100% |*********************************************************| 7053 00:00
sudoers 100% |*********************************************************| 7383 00:00
ntp.conf-prd 100% |*********************************************************| 142 00:00
ntp.conf-dr 100% |*********************************************************| 136 00:00
-bash-3.00$