zcat - expand a gzip file to standard output (= gzip -dc)
zcat FILE...
Options you will use
-c, --stdout- write on standard output, keep original files unchanged
-d, --decompress- decompress
-f, --force- force overwrite of output file and compress links
-k, --keep- keep (don't delete) input files
-l, --list- list compressed file contents (compressed and uncompressed size, ratio)
-t, --test- test compressed file integrity
-v, --verbose- verbose mode
-1, --fast- compress faster
-9, --best- compress better
-h, --help- give this help
-V, --version- display version number
Examples
$ aws s3 cp s3://flow-logs/AWSLogs/.../x.log.gz - | zcatread a delivered flow log file without saving it
Gotchas
- VPC flow logs delivered to S3 are .log.gz files:
aws s3 cp s3://bucket/key.log.gz - | zcat | head. - "gzip: stdin: not in gzip format" = the data was not compressed (or the download failed and you got an error text).
Try zcat in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.