LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-04-2010, 03:53 PM   #1
rbalaa
Member
 
Registered: Mar 2010
Posts: 61

Rep: Reputation: 0
rsync include specific folder


Hi All,

I've searched all over the net and have yet to find an answer to this simple question.

Can I 'include' a sub-directory that's in an 'exclude' specified directory.

example: I want to copy/include 'dirB'

/dirA/dirB
/dirA/dirC

where rsync command has the options set to --exclude='dirA' but --include='dirA/dirB'

Thank you very much for your help.
 
Old 10-04-2010, 08:45 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
No .. think of exclude as being like the grep in:

Code:
ls -rl <dir1> | grep -v <dir2> | ...
.. you can't add things back into the results once they've been filtered out

cheers
 
Old 10-05-2010, 08:56 AM   #3
rbalaa
Member
 
Registered: Mar 2010
Posts: 61

Original Poster
Rep: Reputation: 0
Thanks for the clarification.
 
  


Reply



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
Way to make autofs mount to specific USB flash drive to specific folder? utahnix Linux - Software 2 11-24-2010 05:27 PM
rsync can not rsync files with include filter... xiutuo Linux - Server 2 07-23-2010 02:10 AM
rsync include/exclude problems toaster.waffle Linux - Software 4 11-19-2009 09:57 AM
RSYNC and include?? JediKnight2 Linux - Software 0 02-04-2005 11:52 AM
how to rsync ex/include select specific directories ? dtimms Linux - Software 1 01-11-2005 05:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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
Open Source Consulting | Domain Registration