Copying one directory tree to another but exclude all top-level files
Brian J. Murrell
brian at interlinx.bc.ca
Fri Jan 30 13:23:06 UTC 2026
Hi.
I want to do this:
# rsync -aSPAHX --exclude \* --link-dest=/.snapshots/daily.10/ ../daily.10/ .
so that any *files* in the /.snapshots/daily.10/ directory (but not any
directories in /.snapshots/daily.10/ and directories and files below
that) are excluded?
Using the above syntax, nothing gets copied I suppose because * matches
all of the top-level directories in /.snapshots/daily.10/ also.
Cheers,
b.
More information about the rsync
mailing list