Linked Questions

3
votes
1answer
6k views

Automatically save bash command history in screen session [duplicate]

I connect to a screen session. After doing some stuff I detach it. Then in history | tail I only see screen -r and previous commands and not the commands run in screen session. Basically history shows ...
3
votes
0answers
391 views

What do you use to manage your shell history? [duplicate]

Possible Duplicate: Preserve bash history in multiple terminal windows Can I easily search my history across many screen windows? I rely on my shell history a lot, I use Ctrlr and arrow keys ...
4
votes
0answers
235 views

How to preserve bash history in multiple terminal windows [duplicate]

Possible Duplicate: Preserve bash history in multiple terminal windows While working, usually I have multiple terminal windows open (or tabs). I use konsole, but it could be few ssh sesions to ...
0
votes
1answer
123 views

Can we change how bash_history gets updated? [duplicate]

As I'm using bash on my Desktop, I have a multi-tab Gnome Terminal window with 6 to 10 shells opened in there. When I log out of my X session, my ~/.bash_history gets updated in some random way... (...
1
vote
1answer
60 views

Is there a way to save all bash commands from all terminals to a single file? [duplicate]

Is there a way to save all bash commands from all terminals to a single file? By default, different terminals have different history and that gets confusing. I'd like to save all history to a single ...
0
votes
1answer
69 views

How do I make my bash login session “autosave” its history? [duplicate]

IIANM, bash saves its history to ~/.bash_history (or to $HISTFILE) on exit from a login shell session. But - what if you want to occasionally persist it for fear of the shell getting prematurely ...
77
votes
5answers
27k views

Bash history: “ignoredups” and “erasedups” setting conflict with common history across sessions

First of all, this is not a duplicate of any existing threads on SE. I have read these two threads (1st, 2nd) on better bash history, but none of the answers work - - I am on Fedora 15 by the way. I ...
42
votes
3answers
46k views

using export in .bashrc

I have noticed in my .bashrc, that some lines have export in front, such as export HISTTIMEFORMAT="%b-%d %H:%M " ... export MYSQL_HISTFILE="/root/.mysql_history" whereas other have not, such as ...
29
votes
3answers
10k views

Excluding some of the commands from being getting stored in bash history

Is there any way to exclude commands like rm -rf, svn revert from being getting stored in bash history? Actually I, by mistake, have issued them a number of times even though I have no intent to do, ...
35
votes
2answers
14k views

Why would anyone not set 'histappend' in bash?

After finding out what this shopt -s histappend means, it seems a very sane setting, and I'm surprised that it isn't default. Why would anyone want to wipe their history on each shell exit?
15
votes
4answers
19k views

sometimes history commands are not stored in .bash_history

I issued many commands yesterday in my CentOS 7. But when I wanted to retrieve these commands today, I found there was no any record. When I opened the file .bash_history, I still could not find the ...
11
votes
1answer
6k views

How to sync terminal session command history in bash?

I've tried to search in ~/.bash_history for my recent commands while in a terminal session but they just weren't there. I guess this is because I have multiple terminal sessions open. Is there a ...
5
votes
3answers
4k views

Is it possible to view another shell's history?

I am running something in a bash window that I don't want to interrupt or even suspend momentarily. Is it possible to view command history of that particular window's session? I have multiple windows ...
14
votes
1answer
807 views

Update bash history on other terminals when exiting one terminal

I know this question is not obscure, as it is asked here keep updating (and duplicated here). What I'm trying to achieve is a bit different. I don't like the idea of my prompt rewriting a file every ...
5
votes
1answer
3k views

How to get a persistent “history”-file even after a non-clean shutdown?

I am trying Ubuntu Server 10.10 in VirtualBox. I like that the commands I run is saved in a "history"-file that can be shown with the history command. But if I just turn off VirtualBox without the ...

15 30 50 per page