I am trying to create an rsync command to upload files into a bucket on Google Cloud Storage.
We want to go through the entire computer and upload only csv
files into the bucket. I know that the rsync
command for gsutil
provides a command to exclude files (-x
), but I am having trouble figuring out the regex to exclude all files except .csv files.
For example, if I have these files in these directories:
folder/folder/hello.csv
folder/folder/results.pdf
folder/folder2/test.txt
folder/folder3/hello2.csv
I expect to only upload:
folder/folder/hello.csv
folder/folder3/hello2.csv
Any idea on how this regex would look?
Thanks!