scp command returned `no such file or directory` error

I am trying to copy files from my laptop to a host via ssh command:

roberto@xxxxx1:~$ scp /home/roberto/Metagenoma_MEL_COLS/Mix-MEL_S10_L002_R1_001.fastq.tar.gz :/media/disk7/roberto/

and it shows:

/home/roberto/Metagenoma_MEL_COLS/Mix-MEL_S10_L002_R1_001.fastq.tar.gz: No such file or directory

The output of ls -lsa is:

$ ls -lsa /home/roberto/Metagenoma_MEL_COLS/Mix-MEL_S10_L002_R1_001.fa‌​stq.tar.gz
3268104 -rw------- 1 roberto roberto 3346533319 abr 27 07:01 /home/roberto/Metagenoma_MEL_COLS/Mix-MEL_S10_L002_R1_001.fa‌​stq.tar.gz 

How can I solve it?

1

2 Answers

You seem to run the scp command from the Server, but you must issue it from your Laptop:

roberto@roberto-VirtualBox:~$ scp /home/roberto/Metagenoma_MEL_COLS/Mix-MEL_S10_L002_R1_001.fastq.tar.gz :/media/disk7/roberto/

instead of

roberto@xxxxx1:~$ scp /home/roberto/Metagenoma_MEL_COLS/Mix-MEL_S10_L002_R1_001.fastq.tar.gz :/media/disk7/roberto/

From the Server you could run the following, but a firewall/router might prevent that.

roberto@xxxxx1:~$ scp roberto@roberto-VirtualBox:/home/roberto/Metagenoma_MEL_COLS/Mix-MEL_S10_L002_R1_001.fastq.tar.gz /media/disk7/roberto/
1

Note: the scp command should be used with lowercase (I guess that it is a typo in your question).

The below message:

/home/me/folder/file.tar.gz: No such file or directory

Means that the file you are trying to copy doesn't exists.

You can verify by running ls -lsa on this file

ls -lsa /home/me/folder/file.tar.gz

If the running ls on the file won't return a valid information about the file, it means that you had a typo in the filename and or the path

5

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like