Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

99
Views
Unable to use filename wildcards with s4cmd when trying to copy or sync from Amazon S3

I'm trying to use s4cmd to copy files from an AWS S3 bucket using wildcards which are supposedly supported.

For example, I wanted to sync all AWS S3 log files starting with 2017-03-12 to my local current directory:

s4cmd sync s3://myapp-logs/prod/2017-03-12-19* .

which resulted in all files being copied and the wildcard apparently being ignored:

s3://myapp-logs/prod/2015-10-08-19-24-42-92BBBE9DA93917D1 => ./prod/2015-10-08-19-24-42-92BBBE9DA93917D1
s3://myapp-logs/prod/2015-10-08-19-30-09-BE8D5466FBB5DFD1 => ./prod/2015-10-08-19-30-09-BE8D5466FBB5DFD1
...

I can reproduce this failure regardless of the format of my wildcard.

The only time wildcards work as expected is when I use the cp command, e.g.:

s4cmd cp s3://myapp-logs/prod/2017-03-12-19* // Note that cp doesn't support copying to a local directory

or

s4cmd cp s3://mybucket/mystuff/N*.jpg s3://mybuckettest/
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Can't you use aws s3 CLI?

aws s3 sync s3://myapp-logs . --exclude "*" --include "*prod/2017-03-12-19*"

should work. If it doesn't see use-of-exclude-and-include-filters and modify the command.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!