Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS S3 sync command based on file size only?

Is it possible to run the S3 sync command but only upload the files based on file size and not just include the modified date time of the file?

I am currently running:

aws s3 sync ./../app/dist s3://mywebsite.me/dist --acl public-read

The issue I have is I run gulp commands prior to this and files are generated even though the contents of the files are not changed.

Then doing the sync causes files to be uploaded that have not been modified in terms of content.

like image 950
JD. Avatar asked Jul 17 '26 16:07

JD.


1 Answers

You can use the --size-only sync switch for that.

--size-only (boolean) Makes the size of each key the only criteria used to decide whether to sync from source to destination.

like image 162
Khalid T. Avatar answered Jul 20 '26 05:07

Khalid T.



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!