[CentOS] Rsync - include only files containing matching string
Sean Carolan
scarolan at gmail.comWed Oct 17 16:35:35 UTC 2012
- Previous message: [CentOS] CentOS-announce Digest, Vol 92, Issue 12
- Next message: [CentOS] Rsync - include only files containing matching string
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I have a string, "2012_10_16"; let's call this $YESTERDAY How can I rsync a file tree from a remote machine to the local one, including *only* filenames that contain the matching string? I've read the man page and googled around but can't seem to get the syntax right. I either end up syncing all the files, or none of them. Here's how the code looks now (I will remove the dry run once it is working): rsync -avz --dry-run --include=*$YESTERDAY* remotehost:remotedir/ localdir/transfer/
- Previous message: [CentOS] CentOS-announce Digest, Vol 92, Issue 12
- Next message: [CentOS] Rsync - include only files containing matching string
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list