4 ms·
This guy is the inverse of me, because I have linked my .bash_history to /dev/null
by enibundo 11y ago
This guy is the inverse of me, because I have linked my .bash_history to /dev/null
- tempestn 11y agoSemi-serious question: do you delete all your emails after you've read them too?
- anc84 11y agoYou could just disable it instead, saves some cpu cycles.
- reirob 11y agoWhy?
- otis_inf 11y agoWhy not? I mean, what's the value of knowing you typed 'ls -l' or 'ps -augx' on December 12th, 2012?
- deleted 11y ago[deleted]
- Anderkent 11y agoThe value is in when you remember you did something before, but not exactly how. So you just grep or scan through your history, and the files you edited / commands you ran are likely to refresh your memory even if they don't exactly capture the entire workflow. Also means you don't have to retype complicated commands too often. Practical example: I remember I cleaned up some calibre converted epubs with perl a couple months ago, because they had a piece of text injected by some kind of generator on every page. It took me some time to figure out the exact replacement patterns, and if I were to do it again, I just need to do: $ history 0 | grep perl ... 823 perl -0777 -i.original -pe 's#<b class="calibre1">Generated by ABC Amber LIT Conv<a href="http://www.processtext.com/abclit.html" http://www.processtext.com/abclit.html" class="calibre2">erter, http://www.processtext.com/abclit.html</a></b></p>\n<p http://www.processtext.com/abclit.html</a></b></p>\n<p class="calibre3">##g' part1.xhtml 825 perl -0777 -i.original -pe 's#<b class="calibre1">Generated by ABC Amber LIT Conv<a href="http://www.processtext.com/abclit.html" http://www.processtext.com/abclit.html" class="calibre2">erter, http://www.processtext.com/abclit.html</a></b></p>\n<p http://www.processtext.com/abclit.html</a></b></p>\n<p class="calibre3">##g' *.xhtml ... Then inspect the history around those commands to find exactly how I got to that point.
- w0m 11y agoIt's moreso for when you spend time crafting the perfect command, and dont' want to repeat yourlself. Example.. find . -type d -print0 | sort -z | xargs --null -I '{}' du -sh '{}' | sort -h Simple and clear; but history gives you the convenience to do find<C-R><CR> and having the command run with out parameter/typo verification.
- falcolas 11y agoTo be fair, if you've built the "perfect" command, it would serve you better to put it in a alias or shell script. That way it will move with you.
- jimktrains2 11y ago
- olejorgenb 11y agoI find that facination, care to expand on your reasons? I assume you have the in-memory history enabled, but still