I read series of instructions and answers about scp
Example syntax for Secure Copy (scp)
scp - How to copy a file from a remote server to a local machine? - Unix & Linux Stack Exchange
but I cannot apply it correclty
$ pwd
#the local path on local machine
pwd
/Users/me/PubRepo/bash
When I tried to scp a file from remote to the local
[root@iz2ze9wve43n2nyuvmsfx5z ~]# echo "scp test message" > a_test_file.md
[root@iz2ze9wve43n2nyuvmsfx5z ~]# cat a_test_file.md
scp test message
[root@iz2ze9wve43n2nyuvmsfx5z ~]# pwd
/root
[root@iz2ze9wve43n2nyuvmsfx5z ~]# scp root@icodehero.com:a_test_file.md .
root@icodehero.com's password:
a_test_file.md 100% 17 3.6KB/s 00:00
[root@iz2ze9wve43n2nyuvmsfx5z ~]#
it indicate success to transfer, but I did not find it locally
ls | grep "a_test_file.md"
#does not return
additionally it does not exist anywhere locally
find / -name "a_test_file.md" 2>/dev/null
## no match
What's the problem with my usage?
!
? – Jeff Schaller Nov 05 '18 at 11:54a_test_file.md
oniz2ze9wve43n2nyuvmsfx5z
then copied a file with identical name fromicodehero.com
toiz2ze9wve43n2nyuvmsfx5z
and after this operationa_test_file.md
doesn't exist oniz2ze9wve43n2nyuvmsfx5z
??? – jimmij Nov 05 '18 at 12:11scp your_username@remotehost.edu:foobar.txt /some/local/directory
– Wizard Nov 05 '18 at 12:19iz2ze9wve43n2nyuvmsfx5z
you create a file, then copy a file with the same name, fromicodehero.com
, over the top of the file that you just created. – ctrl-alt-delor Nov 05 '18 at 13:38