First, sorry if this isn 't the right place to post this.
OK, what I thought was pretty simple doesn't work and is driving me nuts...
Added to /etc/bash.bashrc
export HISTTIMEFORMAT="%h %d %H:%M:%S "
export HISTSIZE=10000
Typing env shows both variables, however using up arrow up arrow for history the HISTTIMEFORMAT isn't working.
This is after logging out and back in, rebooting etc. I'm using Mint 12.
If anyone can help me with this it would be greatly apprecated as Ive been searching and working on it for 3 days now.
Thanks in advance for any help!
Bash variable not working
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Topics in this forum are automatically closed 6 months after creation.
Bash variable not working
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
-
- Level 4
- Posts: 203
- Joined: Mon Jan 23, 2012 6:28 pm
Re: Bash variable not working
This will NOT add the (proper) timestamps retroactively to your history by some miracle. Also, this will NOT have any effect when navigating the history via keyboard (would make the history totally unusable for recycling commands). You can see the timestamps when you type theIf this variable is set, time stamps are written to the history file so they may be preserved across shell sessions.
Code: Select all
history
Re: Bash variable not working
Yep, you're right and boy do I feel stupid. Many thanks for your reply!