Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This command does nothing.

scp doc.txt

This command, however, copies doc.txt into the home directory of my website.

scp doc.txt

Why doesn't the first command (without a colon) work?

share|improve this question
You're wrong about the first command. It in fact does something: copies doc.txt to – criziot Jul 15 '12 at 0:57
To clarify why you get downvotes on your question: it does not show any "research effort" which is required on this site, inasmuch as reading man scp would have given you the answer. – Daniel Andersson Jul 15 '12 at 14:08
up vote 5 down vote accepted

According to the man page for scp:


The host needs a colon to indicate that it's remote.

share|improve this answer

scp can be used locally. The colon is how it distinguishes between a local copy and a remote copy. BTW that first one probably does something - copy doc.txt to a file called ""

share|improve this answer

The name is a valid name on the local filesystem. scp like rcp before it uses the colon character to seperate the remote user and hostname from the remote path.

Or to put it differently, that is just the way the program was written.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .