Skip to content

Commit

Permalink
fix(readme): wrap wildcards with quotes (#788)
Browse files Browse the repository at this point in the history
  • Loading branch information
igungor authored Jan 17, 2025
1 parent 991c9fb commit 7e56e29
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ You can also install `s5cmd` from [MacPorts](https://ports.macports.org/port/s5c
> conda config --add channels conda-forge
> conda config --set channel_priority strict
> ```
>
>
> Once the `conda-forge` channel has been enabled, `s5cmd` can be installed with `conda`:
>
>
> ```
> conda install s5cmd
> ```
Expand Down Expand Up @@ -284,7 +284,7 @@ Or you can compress the data before uploading:
#### Delete multiple S3 objects
s5cmd rm s3://bucket/logs/2020/03/19/*
s5cmd rm 's3://bucket/logs/2020/03/19/*'
Will remove all matching objects:
Expand Down Expand Up @@ -319,7 +319,7 @@ folder hierarchy.
an [open ticket](https://github.com/peak/s5cmd/issues/29) to track the issue.
#### Using Exclude and Include Filters
`s5cmd` supports the `--exclude` and `--include` flags, which can be used to specify patterns for objects to be excluded or included in commands.
`s5cmd` supports the `--exclude` and `--include` flags, which can be used to specify patterns for objects to be excluded or included in commands.
- The `--exclude` flag specifies objects that should be excluded from the operation. Any object that matches the pattern will be skipped.
- The `--include` flag specifies objects that should be included in the operation. Only objects that match the pattern will be handled.
Expand Down Expand Up @@ -382,7 +382,7 @@ or
`commands.txt` content could look like:
```
cp s3://bucket/2020/03/* logs/2020/03/
cp 's3://bucket/2020/03/*' logs/2020/03/

# line comments are supported
rm s3://bucket/2020/03/19/file2.gz
Expand Down Expand Up @@ -540,7 +540,7 @@ The environment variable `SHELL` must be accurate for the autocompletion to func
The autocompletion is tested with following versions of the shells: \
***zsh*** 5.8.1 (x86_64-apple-darwin21.0) \
GNU ***bash***, version 5.1.16(1)-release (x86_64-apple-darwin21.1.0) \
***PowerShell*** 7.2.6
***PowerShell*** 7.2.6
### Google Cloud Storage support
Expand Down Expand Up @@ -747,7 +747,7 @@ For a more practical scenario, let's say we have an [avocado prices](https://www
`s5cmd` allows to pass in some file, containing list of operations to be performed, as an argument to the `run` command as illustrated in the [above](./README.md#L293) example. Alternatively, one can pipe in commands into
the `run:`

BUCKET=s5cmd-test; s5cmd ls s3://$BUCKET/*test | grep -v DIR | awk ‘{print $NF}’
BUCKET=s5cmd-test; s5cmd ls "s3://$BUCKET/*test" | grep -v DIR | awk ‘{print $NF}’
| xargs -I {} echo “cp s3://$BUCKET/{} /local/directory/” | s5cmd run

The above command performs two `s5cmd` invocations; first, searches for files with *test* suffix and then creates a *copy to local directory* command for each matching file and finally, pipes in those into the ` run.`
Expand All @@ -774,7 +774,7 @@ Rather than executing

with `run` command, it is better to just use

rm s3://bucket/prefix/2020/0*/object*.gz
rm 's3://bucket/prefix/2020/0*/object*.gz'

the latter sends single delete request per thousand objects, whereas using the former approach
sends a separate delete request for each subcommand provided to `run.` Thus, there can be a
Expand Down

0 comments on commit 7e56e29

Please sign in to comment.