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 directoryThe output of ls -lsa is:
$ ls -lsa /home/roberto/Metagenoma_MEL_COLS/Mix-MEL_S10_L002_R1_001.fastq.tar.gz
3268104 -rw------- 1 roberto roberto 3346533319 abr 27 07:01 /home/roberto/Metagenoma_MEL_COLS/Mix-MEL_S10_L002_R1_001.fastq.tar.gz How can I solve it?
12 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.gzIf 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