Re: Copying one directory tree to another but exclude all top-level files
Kevin Korb via rsync <[email protected]> Fri, 30 Jan 2026 10:37:13 -0500
| Newsgroups | gmane.network.rsync.general |
|---|---|
| Message-ID | <[email protected]> |
That looks right to me. If you want the files within the dirs you ca: --include='/*/***' --exclude='/*' On 2026-01-30 10:19, Paul Slootman via rsync wrote: > On Fri 30 Jan 2026, Brian J. Murrell via rsync wrote: >> On Fri, 2026-01-30 at 08:56 -0500, Kevin Korb via rsync wrote: >>> It sounds like you want: --include='/*' --exclude='/*/' >> No. That doesn't work either. > I think Kevin got it the wrong way round. > You first need to include all directories on the root level, > then exclude all the rest on the root level: > > --include='/*/' --exclude='/*' > > > Paul > -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html