escape character not working in scp
By Gabriel Cooper •
I am trying to transfer some file through scp. But it is not working,
scp "vogo_psql_db\:2017-08-30T18\:00\:01.762662" ":db-dump"
ssh: Could not resolve hostname vogo_psql_db\\: Name or service not knownThe problem is I think that due to colons, it is taking vogo_psql_db as hostname even though the escape chars have been used.
What should be done to solve this ?
21 Answer
According to the manual page man scp:
File names may contain a user and host specification to indicate that the
file is to be copied to/from that host. Local file names can be made
explicit using absolute or relative pathnames to avoid scp treating file
names containing ‘:’ as host specifiers. Copies between two remote hosts
are also permitted.So, you can prepend the local filename with an absolute path, or just the simple relative path ./ i.e.
scp "./vogo_psql_db:2017-08-30T18:00:01.762662" ":db-dump" More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"