Home > Enterprise >  AWS S3 sync how to exclude *.js files but include *.min.js?
AWS S3 sync how to exclude *.js files but include *.min.js?

Time:01-03

I have a javascript folder called js/custom which has both *.js files and the minified version of the file with an extension called *.min.js, I want to make sure I only upload the minified version of the js file, how can I achieve this?

aws s3 sync /var/www/html/js/custom/* s3://inksedge/js/custom/*
--exclude 'js/custom/*.js' 

above will exclude the minified version as well, how do i get the result i want?

CodePudding user response:

Try using the --include argument to include the min files

--include

aws s3 sync /var/www/html/js/custom/* s3://inksedge/js/custom/*
--exclude 'js/custom/*.js' --include 'js/custom/*.min.js'
  • Related