LinuxQuestions.org
Help answer threads with 0 replies.
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 11-05-2010, 08:58 AM   #1
Spuddy
Member
 
Registered: Jul 2010
Posts: 83

Rep: Reputation: 15
rsync only files with "mca" in filename.


I've been trying to rsync only files with mca in their filename but it's sending the whole lot across. Any ideas?

Code:
rsync -dtv --include='mca*' /source/source/source/source/source/source/source/ /dest/dest/dest/
 
Old 11-05-2010, 09:12 AM   #2
udaman
Member
 
Registered: Oct 2010
Location: New England, USA
Distribution: OpenSUSE/Slackware64/RHEL/Mythbuntu
Posts: 187

Rep: Reputation: 39
Just a guess here, but you might try --exclude '*' --include='mca*'.

I recall doing something similar in TSM backups.
 
Old 11-05-2010, 09:14 AM   #3
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, Ubuntu, Amazon Linux
Posts: 1,830
Blog Entries: 21

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by udaman View Post
Just a guess here, but you might try --exclude '*' --include='mca*'.

I recall doing something similar in TSM backups.
Do it the other way around. The include/exclude options are order specific. The first to match is applied.
 
Old 11-05-2010, 10:02 AM   #4
Spuddy
Member
 
Registered: Jul 2010
Posts: 83

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Skaperen View Post
Do it the other way around. The include/exclude options are order specific. The first to match is applied.
That worked, thanks guys!
 
Old 01-14-2011, 10:14 AM   #5
Spuddy
Member
 
Registered: Jul 2010
Posts: 83

Original Poster
Rep: Reputation: 15
is anyone aware of a way I can reverse the way in which rsync works?

For example, if I run the above code rsync might copy,

mca000001
mca000002
mca000003

etc through to

mca999999 (being the latest file)

But I would like rsync to start with the latest file and work backwards, is that possible?
 
  


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
rsync "skipping non-regular files" with --archive option andrewtblake Linux - Server 2 04-29-2010 05:15 PM
[SOLVED] move all ".txt" files, adding parent directory to filename mostofmonty Linux - Newbie 9 09-15-2009 09:39 AM
Renaming Multiple Files with a "." on the end of the filename dbowles Programming 1 05-09-2005 05:28 PM
DPKG & "files list file for package `pkg-config' contains empty filename" error :( Angelus Debian 2 04-02-2005 08:34 AM
"X-MS" cant open because "x-Multimedia System" cant access files at "smb&qu ponchy5 Linux - Networking 0 03-30-2004 12:18 AM


All times are GMT -5. The time now is 12:06 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