We can run a gsutils command to delete objects as follows:
gsutil rm -a gs://bucket/**
Now I would like to only remove certain folders following a wildcard pattern:
gs://bucket/folder/{WILDCARD-A}/folderA/{WILDCARD-B}/folderB
The idea is to delete all files with target folder B.
How can this be achieved with gsutils?
rm -r gs://bucket/folder/{WILDCARD-A}/folderA/{WILDCARD-B}/folderBapplying your wildcat patterns? If you want to bulk delete a hundred thousand or more objects, avoid usinggsutil, as the process takes a long time to complete.wildcat?)