LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-23-2010, 11:39 AM   #1
josesec
LQ Newbie
 
Registered: Jul 2010
Posts: 10

Rep: Reputation: 0
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.
 
Old 07-23-2010, 03:26 PM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
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.
 
Old 07-25-2010, 03:44 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
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.
 
Old 07-26-2010, 08:17 AM   #4
josesec
LQ Newbie
 
Registered: Jul 2010
Posts: 10

Original Poster
Rep: Reputation: 0
I have already done something like that:

scp -r user@computerath/2010*/*h16v07*

the answer is:

?Invalid command

What is the problem?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
copy/delete files on remote server crypted Linux - Server 8 07-07-2010 03:56 PM
how to copy files from a remote server man1979 Linux - General 3 08-16-2005 07:08 AM
Transferring 40000+ files with FTP (mget) shows 0 files tim1235 Linux - Software 5 10-17-2004 07:06 PM
copy files using SSH from a server to another..both remote Santosh_d Linux - Networking 6 03-11-2004 12:02 AM
copy files from a server to another..both remote Santosh_d Linux - Networking 1 03-09-2004 08:52 AM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration