scp

redirect SCP output to file

柔情痞子 提交于 2020-12-07 18:33:35
问题 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 回答1: You can achieve this using script : script -q -c "scp -r file host:~/" > file.log 来源: https://stackoverflow.com/questions/32637393/redirect-scp-output-to-file

redirect SCP output to file

跟風遠走 提交于 2020-12-07 18:33:19
问题 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 回答1: You can achieve this using script : script -q -c "scp -r file host:~/" > file.log 来源: https://stackoverflow.com/questions/32637393/redirect-scp-output-to-file

Where do I find the spec for scp -t?

走远了吗. 提交于 2020-11-29 08:45:51
问题 So I have discovered I can do the following with scp via stdin: Directory creation scp -tr . stdin -> D0755 0 <directory_name> stdin -> \x00 File writing scp -tr . stdin -> C<filemode, eg. 0744> <file_size_in_bytes> <filename> stdin -> actual file bytes stdin -> \x00 In the man pages I can't find any mention of this, nor have I had luck with googling. Where do I find the spec for these various commands: file creation, directory creation? What else can I do? I'm curious where this is defined.

Where do I find the spec for scp -t?

冷暖自知 提交于 2020-11-29 08:43:48
问题 So I have discovered I can do the following with scp via stdin: Directory creation scp -tr . stdin -> D0755 0 <directory_name> stdin -> \x00 File writing scp -tr . stdin -> C<filemode, eg. 0744> <file_size_in_bytes> <filename> stdin -> actual file bytes stdin -> \x00 In the man pages I can't find any mention of this, nor have I had luck with googling. Where do I find the spec for these various commands: file creation, directory creation? What else can I do? I'm curious where this is defined.