Skip to content

Commit

Permalink
command/pipe: update pipe file compression example (#708)
Browse files Browse the repository at this point in the history
Closes #704 

Replaced

```bash
tar -cf - file.bin | s5cmd pipe s3://bucket/file.bin.tar
```

with

```bash
gzip -c file | s5cmd pipe s3://bucket/file.gz
```

Why?
- Less flags, less confusing
- To be consistent with the other examples
  • Loading branch information
ahmethakanbesel authored Jun 10, 2024
1 parent c1c7ee3 commit c13b860
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ You can upload remote objects by piping stdin to `s5cmd`:
Or you can compress the data before uploading:
tar -cf - file.bin | s5cmd pipe s3://bucket/file.bin.tar
gzip -c file | s5cmd pipe s3://bucket/file.gz
#### Delete an S3 object
Expand Down
2 changes: 1 addition & 1 deletion command/pipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Examples:
03. Download an object and stream it to a bucket
> curl https://github.com/peak/s5cmd/ | s5cmd {{.HelpName}} s3://bucket/s5cmd.html
04. Compress an object and stream it to a bucket
> tar -cf - file.bin | s5cmd {{.HelpName}} s3://bucket/file.bin.tar
> gzip -c file | s5cmd {{.HelpName}} s3://bucket/file.gz
`

func NewPipeCommandFlags() []cli.Flag {
Expand Down

0 comments on commit c13b860

Please sign in to comment.