Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rsync will not exclude hidden files in gsutil 4.15

Previously gsutil appeared to not upload hidden files. Now hidden files cannot be prevented from upload. Using the -x command with either .*/\\..* or .*/[.].* still uploads both hidden files and directories. This is with a local directory up to a bucket.

Is there a different expression that is required?

like image 749
Brian Tully Avatar asked Oct 31 '25 03:10

Brian Tully


1 Answers

The -x exclude option should work:

gsutil rsync -x '\..*|./[.].*$' source-dir gs://your-bucket

You can learn more about it from the [official documentation].

like image 192
Mike Schwartz Avatar answered Nov 02 '25 22:11

Mike Schwartz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!