News for hackers. Stuff that matters.
Re:How and Why to Log Your Bash History by jawns on Tuesday May 31, 2016 @10:13AM (#11806600)
This is useful if you are developing locally, but what if a lot of your command line usage is on remote servers that you have SSH'd into?

I believe iTerm2 has some support for logging remote commands, but I'm not sure it quite does the trick. Anybody know of another tool that will log both local and remote commands?

Re:How and Why to Log Your Bash History by blowski on Tuesday May 31, 2016 @10:22AM (#11806657)
Another problem for me is the ephemeral nature of many of the boxes I work on - Vagrant boxes, spot instances on AWS. I suppose I could do this and then export the bash history as part of the teardown process.

At the moment, I get around this by storing as much as I can in searchable scratch files, but this relies on me knowing what to copy. I'm sure there's a better way.

Re:How and Why to Log Your Bash History by mrSugar on Tuesday May 31, 2016 @10:36AM (#11806734)
Work through ansible and manage your local ansible.log however you wish.
Re:How and Why to Log Your Bash History by blowski on Tuesday May 31, 2016 @10:39AM (#11806749)
Any way I can do it with Puppet?
Re:How and Why to Log Your Bash History by superuser2 on Tuesday May 31, 2016 @12:20PM (#11807456)
Do what? Puppet doesn't have a facility for running ad-hoc remote shell commands on demand. Sort of the whole point is to not do that.
Re:How and Why to Log Your Bash History by pbhjpbhj on Tuesday May 31, 2016 @10:23AM (#11806664)
I use the built-in script command sometimes when I'm using SSH, set to write a date+server named text file to my history folder. You could do that and awk out the output lines afterwards.