Reputation: 615
I've tried:
scp -r file host:~/ 2>&1 | tee -a file.log
scp -r file host:~/ >file.log 2>&1
scp -r file host:~/ &>file.log
and i only ever get a blank file. what am I doing wrong? the goal is to capture the output of the files transferred to the text file
Upvotes: 2
Views: 3557
Reputation: 11844
You can achieve this using script
:
script -q -c "scp -r file host:~/" > file.log
Upvotes: 1