Reputation: 598
I am trying to copy a file from a remote server to my local Windows machine using Cygwin. Here the command I am using:
userMe$ scp [email protected]:~/Desktop/O'Bryan/file.csv ~/
On enter, the system returns a pipe:
userMe$ scp [email protected]:~/Desktop/O'Bryan/file.csv ~/
>
What is happening?
Upvotes: 1
Views: 414
Reputation: 126
Your shell is interpreting the quote '
. You need to escape it with double quotes "'"
, or a slash \'
. I recommend attempting to avoid the use of '
in file names.
scp [email protected]:~/Desktop/O\'Bryan/file.csv ~/
or
scp [email protected]:~"/Desktop/O'Bryan/file.csv" ~/
or
scp [email protected]:~/Desktop/O"'"Bryan/file.csv ~/
More info: http://www.grymoire.com/Unix/Quote.html Read everything at the grymoire site. It may be old, but it is great info and written in an engaging way.
Upvotes: 1
Reputation: 2482
The apostrophe in "O'Bryan" opened a string and the command is waiting for the closing quote. You can escape it (\') to avoid this from happening.
Upvotes: 2