I want to delete all files and folders using folder or container path without listing all files in it. Is it possible?
Asked
Active
Viewed 5,658 times
4 Answers
3
Note that with more recent versions of openstack, there is a --recursive
option available if you're deleting any entire container:
openstack container delete --recursive mycontainer

larsks
- 277,717
- 41
- 399
- 399
-
Thanks! Is it possible from API? – Andrej Apr 13 '20 at 20:46
-
1The CLI tools interact with Swift using the API, so it must be. If you run the above command with `--debug` enabled, you can see the API calls the tool is making. – larsks Apr 14 '20 at 13:26
2
You use the following 2 steps method based on swift package (https://launchpad.net/swift) - Successfully tested on debian jessie
In a terminal, once swift tool configurated, type :
# swift list | grep > yourobjectname.lst
# cat yourobjectname.lst | xargs swift delete {}
Regards

c-tools
- 83
- 7
1
No it's not possible with the OpenStack API that comes out-of-the-box. You need to explicity list the objects/containers and delete them using the bulk operation

Chen Xie
- 3,849
- 8
- 27
- 46