LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to do a remote copy of several files by using mget? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-do-a-remote-copy-of-several-files-by-using-mget-821716/)

josesec 07-23-2010 10:39 AM

How to do a remote copy of several files by using mget?
 
I would like to copy several files from a remote machine. This archives are contained in different folders and their name have a commun caractheristic (also the folders).
I have tried something like that:

ftp
open machine@
prompt %to get into the non interactive mode
mget *folder*/*commun* % So that it should search in all the folders %containing the word "folder" all the files containing the word "commun" %and copy all this files to the current directory of my computer.
%But I get the following error for each file:
...folder.../...commun...: no such file or directory
...
% It seems that the computer reads all the path and not only the name.
%I have also tried with rcp and scp but the message I have is "invalid command"
What should I do?
What is the problem?
Thank you very much for your help.

crabboy 07-23-2010 02:26 PM

Ambitious use of FTP; while mget can get multiple files with a wildcard, it won’t do it recursively. Even with a client like ncftp, you can’t specify a pattern with a recursive get. there may be an ftp client out there that will do this, but the standard ftp will not.

Try looking at rsync.

chrism01 07-25-2010 02:44 AM

From your description, scp should work, but you'll need the -r (recursive) option http://linux.die.net/man/1/scp .
If it doesn't, please show use exactly what you typed and the responses.

josesec 07-26-2010 07:17 AM

I have already done something like that:

scp -r user@computer:path/2010*/*h16v07*

the answer is:

?Invalid command

What is the problem?


All times are GMT -5. The time now is 09:09 AM.