Reputation: 1523
I would like to execute aws s3 sync . s3://<some bucket>
and use the --exclude
flag to exclude all files with an extension in the filename and change the content-type
.
Tried this but does not work. Still finds files with extension.
/usr/bin/aws s3 sync /home/www s3://<bucket name> --dryrun --exclude "*.*" --include "*" --content-type text/html
Upvotes: 0
Views: 786
Reputation: 1604
You just need to use --exclude
to exclude files with extensions
aws s3 sync --exclude "*.*" --content-type="text/html" . s3://hernan-test-bucket/
Example execution:
:~# ls
file1 file2 file3.txt file4.txt
:~# aws s3 sync --exclude "*.*" --content-type="text/html" . s3://bucket/
upload: ./file1 to s3://bucket/file1
upload: ./file2 to s3://bucket/file2
Upvotes: 1