Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
305 views
in Technique[技术] by (71.8m points)

amazon web services - Picking random 100 files in aws s3 path with subdirectories and then copying them to another folder

I have a aws s3 bucket s3://bucket1/ that has multiple subdirectories at two levels with the structure s3://bucket1/shard-*/task-*/filename1.txt and I have to select random 100 files from the bucket. What I did was to use "aws s3 ls recursive" along with awk and shuf to get a list of these 100 files and store it in a file. But now I wanted to copy these 100 files into a specific bucket in s3. How do I go about doing this? Is there a "aws s3 cp" where I can use the list?

question from:https://stackoverflow.com/questions/66052928/picking-random-100-files-in-aws-s3-path-with-subdirectories-and-then-copying-the

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...