Linked Questions
40 questions linked to/from Preserve bash history in multiple terminal windows
1
vote
1
answer
99
views
I can't get bash history to update instantly in all terminals
I'm using a fresh install of Ubuntu 22.04.3, with gnome-terminal, and I haven't directly edited ~/.bashrc. Various sources say adding the following to it achieves what I'm looking for:
shopt -s ...
1
vote
0
answers
560
views
history of new shell is missing the last few commands?
I've noticed this pretty much ever since I started using Unix systems many years ago, and never bothered to figure out why, abut now I am.
When I use terminal, and I want to use history to see a ...
2
votes
0
answers
852
views
Sync terminal history in c shell
For work, I remote into a linux server that uses c shell rather than bash using Remote Desktop. While in session (lets call it session 1) I'll open up many tabs in a given terminal and type commands ...
1
vote
1
answer
734
views
Search through bash history shared by multiple terminal windows, but keep sessions separate
I've read the solutions at Preserve bash history in multiple terminal windows
and I'm looking for the following compromise:
Commands from all concurrent bash sessions are appended after being ...
0
votes
0
answers
220
views
.bashrc history command not working when new terminal window opened
I added some simple history command in order to get some info every time
I am on a Ubuntu 18.04.2 LTS Dell local machine with bash 4.4.20(1)-release, shell /bin/bash. If I open a new shell:
history | ...
1
vote
1
answer
279
views
Explanation of `history -c;` in the following well known snippet for preserving bash history
I am using the following code in my .bashrc file for keeping everything in history when I have multiple tmux panes open:
# Avoid duplicates
HISTCONTROL=ignoredups:erasedups
# When the shell exits, ...
0
votes
1
answer
527
views
where is the history of the current terminal window saved?
I understand that command line history in the case of bash is saved in .bash_history.
When you open a terminal emulator window in Ubuntu/MacOS and work in it, the history is not saved in ....
2
votes
1
answer
2k
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 ...
2
votes
0
answers
520
views
history -c does not reset $HISTCMD to 1
TL;DR: If your history begins to truncate (e.g., your HISTSIZE is 400 but your history number is 500), resetting your history with history -c will clear HISTSIZE or fewer lines from your history, and ...
5
votes
1
answer
2k
views
How do I make my bash login session "autosave" its history? [duplicate]
If I am not mistaken, 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 ...
4
votes
2
answers
2k
views
Share shell history across sessions without interleaving it
There is a similar question here, but I want to achieve something different: I would like to share history between sessions, but without mixing the commands that were executed in different sessions ...
3
votes
2
answers
321
views
Archive history without exiting the shell
I just realised that a workflow I've been using for years, doesn't do what it is supposed to do. Since I haven't realised that for such a long time, you might think it's not worth putting much effort ...
3
votes
2
answers
3k
views
What are the cases where the command you typed are lost from the history?
I typed a bunch of commands and when I ran history I saw they were not present in there.
Beside the case when the command start with a (space) what are the cases when commands will not be logged in ...
0
votes
2
answers
3k
views
Hitting up-arrow does not cycle through history
I'm new on Unix&Linux and wanted to comment on an already exhaustive approach to a different question. My rep isn't 50, yet (sad), so it won't let me. I tried this solution to this question: ...
3
votes
1
answer
143
views
Why does default bash seem to not have some of the commands I've used in history but does have others?
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 ...