include-from or files-from

Steven Levine steve53 at
Thu Oct 28 11:01:08 MDT 2010

In <AANLkTi=Z1BPCuh-BhfqC0e7cUdin2pkgHXDAv9JQSwC3 at>, on
   at 10:18 AM, ml ml <mliebherr99 at> said:


Please reply to the list.

>mario at mario-laptop:~/foo2$ find .

>My rsync command: rsync -avnz --recursive --include-from="include.txt" *

FWIW, -a implies --recursive.

FWIW, there's no real benefit to -z for local transfers.  Less data goes
through the pipes, but the compression logic takes CPU cycles.

As a matter of style, I would use --filter=include.txt, since what you
have is a filter list rather than a simple include list.

>cat include.txt
>+ /some/
>+ /some/path/
>+ /some/path/this-file-is-found
>+ /file-also-included
>- *

>rsync -avnz --recursive --include-from="include.txt" * bar
>sending incremental file list
>created directory bar

>sent 89 bytes  received 19 bytes  216.00 bytes/sec
>total size is 0  speedup is 0.00 (DRY RUN)

>Why does it not transfer the files recursively?

It does, but you told rsync to ignore all the other directories with -*. 
This is a downside of using the paridigm.  Depending on your needs,
--prune-empty-dirs may be a better solution.

Also, to be consistent with your find finds, you command line needs to be

 rsync -n -ai --filter=include.txt ./ bar


"Steven Levine" <steve53 at>  eCS/Warp/DIY etc.

More information about the rsync mailing list