SCP on a Mac

$cp: No such file or directory

This is a weird error to get. I had never used “scp” on my Mac before, only ssh, but I was familiar with sending commands over ssh to remote boxes like this:

$git clone ssh:// .

This command would clone the remote repository into the current directory. I (wrongly) assumed that sytax for other commands was the same as git.

Just in case anyone else out there is having trouble with the syntax for the command “scp” on a mac here is the correct usage:

$scp* .

This would clone all the files in the ~/www/ directory into the current directory on your Mac. If you want all the subdirectories add the “-r” flag like you would locally.

comments powered by Disqus