Prevent scp from copying local files?

Posted by ashcatch on Super User See other posts from Super User or by ashcatch
Published on 2010-05-17T07:19:31Z Indexed on 2010/05/17 7:30 UTC
Read the original article Hit count: 507

Filed under:
|
|
|

I just read the Linux scp command issue question and it reminded me that I regularily forget to specify the colon in the host part of a scp command, and thus copying a file locally instead of copying to a remote host, e.g. I do

scp foo host

instead of

scp foo host:

But I never use scp to copy a file locally. So I wonder if there is a way to make scp fail if both (the source and destination) arguments refer to local files.

© Super User or respective owner

Related posts about scp

Related posts about unix