Hi Sharadha,

Maybe it is because you just have this single file in folder1/folder2?

In s3 you don't have the concept of 'files' and 'folders'. There are just
files with a filename that can contains '/'.
So we give the illusion of a file hierarchy based on the filename prefix
but the folders in themselves doesn't exist.

So, if you delete the single file in this part of the tree, you will not
have any other files with the prefix folder1/folder2 and so you will think
that the folders were deleted but it is just that they 'ever existed in the
first place.

If you had another file in folder1, it would still appear after the command.

Regards,

Florent


Le mer. 16 déc. 2020 à 07:42, Sharadha Krishna <sharadha.kris...@hipbar.com>
a écrit :

> Hi,
>
> I am trying to delete files inside a particular folder in the s3 bucket.
> For this I am using the command *s3cmd del
> s3://bucket_name/folder1/folder2/file_name*.
>
> When I execute this, the entire directory structure gets deleted, meaning
> folder1 and folder2 also get deleted along with the filename.
>
> So can someone let me know how to solve this?
>
> Thanks,
> Sharadha
> _______________________________________________
> S3tools-general mailing list
> S3tools-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/s3tools-general
>
_______________________________________________
S3tools-general mailing list
S3tools-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/s3tools-general

Reply via email to