On a Mac, Sierra.
I have no HIST
related settings that I can see:
~ @ Magni (jcollum)
$ env|grep HIST
~ @ Magni (jcollum)
$ cat ~/.bash_profile | grep HIST
~ @ Magni (jcollum)
But I have things in my history that I did yesterday that are not there after a restart. Really really doubt I put spaces before the command every time I did it.
I know there are posts on here that tell me how to fix it but I would like to know why it happens this way.
For instance when I grep for a curl
that I ran yesterday, nothing:
~ @ Magni (jcollum)
$ history | grep curl
166 curl -X POST -d email=jollum@gmail.com -d password=********** http://localhost:3000/login
503 hg curl
519 history | grep curl
400 commands ago? I know I've used curl
a dozen times in the past week but (and I don't use bash enough to have run hundreds of commands this week).
Basically I'm just perplexed and don't know why it's missing so much of what I did. Is it possible that history is only being recorded from one bash instance?
set
rather thanenv
in your first command, also, though I doubt it makes a difference. – Michael Homer May 26 '17 at 21:52set
might be more suitable since theHIST*
variables could be set inbashrc
and not exported, soenv
wouldn't see them. But that doesn't seem to be the (only) issue here. – ilkkachu May 26 '17 at 22:25