Skip to content

Add option to stdin to cp #182

@mrekim0

Description

@mrekim0

Basically the other end of #20, which resulted in s5cmd cat. It doesn't look like using s5cmd run or cp has the magic "-" option to take in a piped input from stdin.

Use cases: Pipe a tar archive (or any streamed command output) into s5cmd without needing a intermediary temp file. This also solves cases where we want to preserve timestamps, permissions, etc.

Example:
tar -cf - foo | s5cmd cp - s3://bar/foo.tar

or if using s5cmd run

tar -cf - foo | echo "cp - s3://bar/foo.tar" | s5cmd run

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions