Reputation: 1830
I know how to do it with for but is there an easy way?
touch temp/foo
for i in $(find my-dir/* -newer temp/foo);
do
gsutil -m cp -r "$i" gs://my-bucket/
done
Upvotes: 2
Views: 251
Reputation: 67163
The gsutil cp -I
parameter should help with this. It allows you to read the list of files to copy from stdin.
I think this would work:
find my-dir/* -newer temp/foo | gsutil -m cp -I gs://my-bucket/
Upvotes: 4