How to properly use include exclude parameters #6988
-
Hi there, I am constantly astonished at how poor the include and exclude flags are... I have a directory that I want to delete all txt files from: 2022-03-16 16:19:40 61 CameraStreamer.txt What I've tried: ❯ aws s3 rm s3://plotlogicdevelopers/JAMES/ --exclude "*" --include "txt" --dryrun How tf do I delete these files? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @jtroeth1 I think you want to add the
Here is the |
Beta Was this translation helpful? Give feedback.
Hi @jtroeth1 I think you want to add the
--recursive
flag to your command and use"*.txt"
like this:aws s3 rm s3://plotlogicdevelopers/JAMES/ --exclude "*" --include "*.txt" --dryrun --recursive
Here is the
rm
documentation for reference: https://docs.aws.amazon.com/cli/latest/reference/s3/rm.html