What is the process of using wildcards to copy files group in AWS CLI

606    Asked by Deepalisingh in AWS , Asked on Feb 19, 2021
Answered by Deepali singh

You can utilize 3 undeniable level S3 commands that are inclusive, exclusive, and recursive.


--include and --exclude are utilized are used to specify rules that filter the objects or files to be copied during the sync operation or if they have to be deleted

Utilizing recursive command on a file or registry, the command walks the directory tree including all the sub-directories Syntax:

--exclude "*" --include "*.txt" \All files will be excluded from the command except for files ending with .txt

--include "*.txt" --exclude "*" \All files will be excluded from the comand

Syntax:

aws s3 cp /tmp/foo/ s3://bucketfiles/ --recursive --exclude "*" --include "*.jpg"

Try the coded provided below:

aws s3 cp s3://personalfiles/ . --recursive --exclude "*" --include "file*”

Learn more about AWS by going through AWS course and master this trending technology.


Your Answer

Interviews

Parent Categories