How to pull files that are behind excluded directories

Harry Putnam reader at
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.  



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

ls News/agent/nntp/
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

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*" \
 --exclude="*news\.*/" ~/News/* News

The directories that are newsserver names are not penetrated.

More information about the rsync mailing list