BUG: scp -r follows symlinks

Mordechai T. Abzug morty at frakir.org
Wed Jan 7 10:38:13 EST 2004


On Tue, Jan 06, 2004 at 11:14:36AM -0600, Ben Lindstrom wrote:

> I'm sorry but scp is *DEAD*.  It is there for historical reasons.
> GET OVER IT.

Which is cleanest and easiest to read for trivial script use:

option 1:

scp -B $server:$file $ldir

option 2:

sftp -b /dev/fd/3 $server 3<<EOF
lcd $ldir
get $file
EOF

option 3:

printf "lcd $ldir\nget $file\n" | sftp -b /dev/fd/0 $server


Do you have a better way to use sftp?

Unlike the original poster, I don't care about links, but I sure do
care about scp not being considered obsolete and historical.  Unless
sftp gets a clear-to-read command-line mode, I'll be using scp in
scripts indefinitely.

- Morty




More information about the openssh-unix-dev mailing list