Skip to content

Instantly share code, notes, and snippets.

@lozadaOmr
Last active October 6, 2015 13:48
Show Gist options
  • Save lozadaOmr/42d89f8e3830d4647249 to your computer and use it in GitHub Desktop.
Save lozadaOmr/42d89f8e3830d4647249 to your computer and use it in GitHub Desktop.
Pipe top command output to a gzip file
#!/bin/bash
/usr/bin/top -b -n 1 | gzip -c > ~/core_top_logs/$(date +"%Y-%m-%dT%H:%M:%S").gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment