[PLUG] Copying to new host, excluding a directory tree
Reid
nrwahl at protonmail.com
Wed Jul 17 23:47:06 UTC 2019
You'd want to add `-mindepth 1` as well, otherwise you'll match the home directory itself. Just tested.
# rsync -r $(find ~ -mindepth 1 -maxdepth 1 ! -name "data") DEST
Sent with ProtonMail Secure Email.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, July 17, 2019 4:31 PM, Rich Shepard <rshepard at appl-ecosys.com> wrote:
> On Wed, 17 Jul 2019, Reid wrote:
>
> > Edit:
> >
> > rsync -r $(find ~ -maxdepth 1 ! -name "data") SRC DEST
> >
> > =======================================================
> >
> > should be:
> >
> > rsync -r $(find ~ -maxdepth 1 ! -name "data") DEST
> >
> > ===================================================
> >
> > since the find result would be your SRC in this case.
>
> Missed that point.
>
> Thanks,
>
> Rich
>
> PLUG mailing list
> PLUG at pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
More information about the PLUG
mailing list