Linux: History
-
In trying to isolate why an install worked on one system and not on another, I need only review
history
It's a great resource unless you have a habit of covering your 'tracks' by runninghistory -c
- which clears it.So - how do you quickly and easily look at it as a text file? simple... nearly always find it via GOOGLE, but why not tag it here.
history >> /home/%user/Desktop/history.txt
This exports it to a text file on your desktop.. history saved,.. just store it of PC and you can do more trouble shooting if needed.
Hope it helps someone other than myself.
-
you can just do
gedit ~/.bash_history
or if you like the cli
cat ~/.bash_history
Obv only Bash if that's what you're using.
-
Another tip. Instead of needing to clear your history you can enable a space to hide that command. This way you can use environment variables for credentials instead of storing in files or being tracked in your history. Just enable it with
export HISTCONTROL=ignorespace
in your ~/.bashrc.
Then just add a space before the command and it's hidden from your history.
-
@stacksofplates said in Linux: History:
you can just do
gedit ~/.bash_history
or if you like the cli
cat ~/.bash_history
Obv only Bash if that's what you're using.
That’s what I do
-
@stacksofplates said in Linux: History:
you can just do
gedit ~/.bash_history
or if you like the cli
cat ~/.bash_history
Obv only Bash if that's what you're using.
Why conCATenate? Just use LESS.
-
@francesco-provino said in Linux: History:
@stacksofplates said in Linux: History:
you can just do
gedit ~/.bash_history
or if you like the cli
cat ~/.bash_history
Obv only Bash if that's what you're using.
Why conCATenate? Just use LESS.
You can do either or any combination. Mostly just pointing you you don't need the gui.