How to pull files that are behind excluded directories

Harry Putnam reader at newsguy.com
Sat Jul 5 17:02:54 EST 2003


Can this be done:

Directory structure under ~/News
  News/agent/nntp/(various server names)/=> thousands of actual news
  messages/  But also a few files I wnat backed up.  

Example

  News/agent/nntp/some.news.server/agent.lib

I want agent.lib directory but not all the other stuff under
some.news.server

ls News/agent/nntp/some.news.server/
agent.lib comp gnu alt

The other directories might change from day to day so a simple
exclude of current ones would eventually fail.

I have an exclude rule like 
some.news.server
other.news.server
yeanother.news.serv

Which live under nntp/  All have agent.lib directories beneath them

Trying these command lines doesn't have the desired effect:
  rsync -nav --exclude="enews.newsguy*" \
  --exclude="*news\.*/" \ 
  --include="agent/nntp/*/agent.lib" ~/News/* News

Or the other way round:
rsync -nav --exclude="enews.newsguy*" \
 --include="agent/nntp/*/agent.lib"\
 --exclude="*news\.*/" ~/News/* News

The directories that are newsserver names are not penetrated.




More information about the rsync mailing list