Skip to content

Instantly share code, notes, and snippets.

@clyang
Created September 6, 2015 20:18
Show Gist options
  • Save clyang/4edbb710699171de7d6b to your computer and use it in GitHub Desktop.
Save clyang/4edbb710699171de7d6b to your computer and use it in GitHub Desktop.
記錄超長bash history
HOSTNAME="$(hostname)"
HOSTNAME_SHORT="${HOSTNAME%%.*}"
HISTFILE="${HOME}/.history/$(date -u +%Y/%m/%d.%H.%M.%S)_${HOSTNAME_SHORT}_$$"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment