Including Specific files n levels deep

Andrew Liles andrew.liles at starfishzone.com
Fri Feb 13 23:41:15 GMT 2004


OK, but I have an arbitrary structure, i.e.

/home/build/apache-1.3.26
/home/build/bzip2-1.0.2
/home/build/dir3
/home/build/dir4
/home/build/dir5

etc.

(The problem context is that I record every I build/install I do with a 
directory and a series of well known shell file names like Build, Install 
with corresponding .out files that record the job.  These directories 
contain the source files and other arbitary intermediary build files.  I 
want to record to another place just the Build/Install shell & output files 
but not all any other stuff.  I have many directories under /home/build/)

At 22:35 13/02/2004, Wayne Davison wrote:
>On Fri, Feb 13, 2004 at 09:20:57PM +0000, Andrew wrote:
> > I want to use rsync to create: [...]
>
>Put these lines into a file and then use the --files-from option:
>
>% cat names
>apache-1.3.26/Build
>apache-1.3.26/Build.out
>apache-1.3.26/Install
>apache-1.3.26/Install.out
>bzip2-1.0.2/Build
>bzip2-1.0.2/Build.out
>bzip2-1.0.2/Install
>bzip2-1.0.2/Install.out
>% rsync -tv --files-from=names /home/build /backup
>
>I'm assuming that none of those are directories.  If you want all the
>files from inside a named directory, add the -r option.
>
>..wayne..



More information about the rsync mailing list