How to display only files from aws s3 ls command

0 votes

I am using the AWS CLI to list the files in an s3 bucket using the following command (documentation):

AWS s3 ls s3://mybucket --recursive --human-readable --summarize

This command gives me the following output:

2013-09-02 21:37:53 10 Bytes a.txt 
2013-09-02 21:37:53 2.9 MiB foo.zip 
2013-09-02 21:32:57 23 Bytes foo/bar/.baz/a 
2013-09-02 21:32:58 41 Bytes foo/bar/.baz/b 
2013-09-02 21:32:57 281 Bytes foo/bar/.baz/c 
2013-09-02 21:32:57 73 Bytes foo/bar/.baz/d 
2013-09-02 21:32:57 452 Bytes foo/bar/.baz/e 
2013-09-02 21:32:57 896 Bytes foo/bar/.baz/hooks/bar 
2013-09-02 21:32:57 189 Bytes foo/bar/.baz/hooks/foo 
2013-09-02 21:32:57 398 Bytes z.txt Total Objects: 10 Total Size: 2.9 MiB

However, this is my desired output:

a.txt foo.zip foo/bar/.baz/a foo/bar/.baz/b foo/bar/.baz/c foo/bar/.baz/d foo/bar/.baz/e foo/bar/.baz/hooks/bar foo/bar/.baz/hooks/foo z.txt

How can I omit the date, time and file size in order to show only the file list?

Apr 19, 2022 in AWS by Soham
• 9,710 points
1,400 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In AWS

0 votes
2 answers

How to display just the name of files using aws s3 ls command?

aws s3 ls s3://<your_bucket_name>/ | awk '{print ...READ MORE

answered Mar 17, 2019 in AWS by anonymous
22,209 views
+3 votes
6 answers

How to move files from amazon ec2 to s3 bucket using command line

Hey, 3 ways you can do this: To ...READ MORE

answered Oct 9, 2018 in AWS by Omkar
• 69,220 points
20,001 views
0 votes
1 answer

How to edit files in the AWS S3 bucket from CLI?

Hi@akhtar, According to my knowledge,  you can't edit ...READ MORE

answered Jun 8, 2020 in AWS by MD
• 95,460 points
9,685 views
0 votes
2 answers

How to access files in S3 bucket from R?

You can take a look at the ...READ MORE

answered Aug 10, 2018 in AWS by Deepthi
• 300 points
6,617 views
+6 votes
14 answers

Python AWS Boto3: How do i read files from S3 Bucket?

You can use the following code, import boto3 s3 ...READ MORE

answered Dec 7, 2018 in AWS by Nitesh
315,571 views
0 votes
1 answer

AWS S3 uploading hidden files by default

versioning is enabled in your bucket. docs.aws.amazon.com/AmazonS3/latest/user-guide/….... the ...READ MORE

answered Oct 4, 2018 in AWS by Priyaj
• 58,020 points
5,957 views
–1 vote
1 answer

How to decrypt the encrypted S3 file using aws-encryption-cli --decrypt

Use command : aws s3 presign s3://mybucket/abc_count.png you get ...READ MORE

answered Oct 22, 2018 in AWS by Priyaj
• 58,020 points
5,204 views
0 votes
2 answers
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP