Skip to content

Instantly share code, notes, and snippets.

@sepehr
Last active January 19, 2016 03:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sepehr/b7524d2556348f9c1749 to your computer and use it in GitHub Desktop.
Save sepehr/b7524d2556348f9c1749 to your computer and use it in GitHub Desktop.
Shell: History via mail
#!/bin/bash
tail -n 100 ~/.bash_history | mail -v -s "Shell history log of '$HOSTNAME'" lajevardi+logs@gmail.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment