I am running Amazon S3 ls recursively over a folder inside an Amazon S3 bucket, when I use this command to count total no of objects aws s3 ls $bucket/$line --recursive | wc -l
And when i compute the no of objects via aws console by selecting the folder and clicking on "Get Total Size" , I get lesser no of objects for some folders while for other it is same as calculated via aws s3 ls --recursive command.
Does Amazon S3 ls computing more objects incorrectly ? if yes then how to correct ?