I have a file structure like: /home/build/apache-1.3.26/apache_1.3.26.tar.gz /home/build/apache-1.3.26/apache_1.3.26/...morefiles /home/build/apache-1.3.26/Build /home/build/apache-1.3.26/Build.out /home/build/apache-1.3.26/Install /home/build/apache-1.3.26/Install.out /home/build/bzip2-1.0.2/bzip2-1.0.2.tar.gz /home/build/bzip2-1.0.2/bzip2-1.0.2/...morefiles /home/build/bzip2-1.0.2/Build /home/build/bzip2-1.0.2/Build.out /home/build/bzip2-1.0.2/Install /home/build/bzip2-1.0.2/Install.out I want to use rsync to create: /backup/home/build/apache-1.3.26/Build /backup/home/build/apache-1.3.26/Build.out /backup/home/build/apache-1.3.26/Install /backup/home/build/apache-1.3.26/Install.out /backup/home/build/bzip2-1.0.2/Build /backup/home/build/bzip2-1.0.2/Build.out /backup/home/build/bzip2-1.0.2/Install /backup/home/build/bzip2-1.0.2/Install.out I have tried various permutations in vain, including: rsync -rv \ --include '*/' \ --include 'Build.out' \ --include 'Build' \ --include 'Install*' \ --exclude '*' \ /home/build \ /backup rysnc 2.6.0 I apologise for not being able to decrypt the man page; scanning the list it would appear others are also as dull as I.
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..