aws cli s3 bucket remove object with date condition
how do i remove aws cli s3 bucket remove object with date condition recursively i am using this command for listing aws s3 ls --recursive s3://uat-files-transfer-storage/ | awk '$1 < "2018-02-01 11:13:29" {print $0}' | sort -n its run perfectly but when i use this command with rm its delete all files aws s3 rm --recursive s3://uat-files-transfer-storage/ | awk '$1 < "2018-02-01 11:13:29" {print $0}' | sort -n any solution You're on the right track. To understand what's going on, let's look at what your commands are doing step by step. aws s3 ls --recursive s3://uat-files-transfer-storage/ |