Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon s3 仅上载文件名中没有扩展名的文件_Amazon S3_Aws Cli - Fatal编程技术网

Amazon s3 仅上载文件名中没有扩展名的文件

Amazon s3 仅上载文件名中没有扩展名的文件,amazon-s3,aws-cli,Amazon S3,Aws Cli,我想执行aws s3同步。s3://并使用--exclude标志排除文件名中具有扩展名的所有文件,并更改内容类型 尝试过这个,但不起作用。仍然查找扩展名为的文件 /usr/bin/aws s3 sync/home/www s3://--dryrun--exclude“*.”--include“*”--content-type text/html您只需使用--exclude来排除扩展名文件 aws s3 sync --exclude "*.*" --content-type="text/html"

我想执行aws s3同步。s3://并使用
--exclude
标志排除文件名中具有扩展名的所有文件,并更改
内容类型

尝试过这个,但不起作用。仍然查找扩展名为的文件


/usr/bin/aws s3 sync/home/www s3://--dryrun--exclude“*.”--include“*”--content-type text/html

您只需使用
--exclude
来排除扩展名文件

aws s3 sync --exclude "*.*" --content-type="text/html" . s3://hernan-test-bucket/
执行示例:

:~# 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

很抱歉我更新了描述。我想上传没有扩展名的文件,并将其内容类型更改为
text/html