Skip to main content

Questions tagged [command-history]

recall commands previously typed in a shell or other utility

1 vote
0 answers
61 views

Bash history works OK for except for sudo commands. Code from .bashrc follows. How can I modify the behaviour to include anything starting with sudo? NOTE. This behaviour is the same with a brand new ...
imazed's user avatar
  • 11
1 vote
0 answers
57 views

I'm trying to find out when the first shell (unix or otherwise) was introduced with the feature "press up to edit the previous command". The earliest things I have definite dates for so far ...
Richard Barrell's user avatar
0 votes
0 answers
92 views

I've got MacBook from work and try to make it work similar to Linux. This is my config for history in bash: # When the shell exits, append to the history file instead of overwriting it export ...
jcubic's user avatar
  • 10.5k
-2 votes
2 answers
102 views

so trying to capture history with date and readable timestamps AND the command should appear on same line. following is failing: Bash ver is: GNU bash, version 4.4.20(1)-release (x86_64-redhat-linux-...
Rajeev's user avatar
  • 268
4 votes
2 answers
299 views

I use Arch Linux and bash. I've identified the following and can't understand how it works. The first issue is: history -cw doesn't clear ~/.bash_history file but history -c ; history -w does. The ...
hlooo's user avatar
  • 41
4 votes
0 answers
100 views

Why does echo "$(fc -l -1)" show the previous command, but echo "$(fc -l -1 | cat)" show the current command? $ testfc () { > echo "$(fc -l -1)" > echo &...
Jacktose's user avatar
  • 532
0 votes
1 answer
73 views

I am looking for a very specific behavior in my Zsh terminals. I have multiple terminal windows open at the same time. On each terminal window, if I hit the up arrow, I'd like for it to go up through ...
mareoraft's user avatar
  • 649
7 votes
3 answers
1k views

What can I do so that my .bash_history is only aver appended to? I am working in a lot of environments, like singularity, apptainer, docker, podman and ssh with various settings and mounts. Each of ...
KamilCuk's user avatar
  • 970
1 vote
1 answer
70 views

According to this page: https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html history-search-backward: "Search backward in the history for a line beginning with the first word in the buffer....
sloppy's user avatar
  • 171
-1 votes
1 answer
89 views

Why does ksh history -0 (last command which is the history command itself) work, yet zsh it fails (only history -1 avail on my zsh). I tried zsh -f to use default options and it still fails. I'm ...
atod's user avatar
  • 155
1 vote
2 answers
118 views

I am having trouble with gdb. When I start pushing the Up Arrow key, it iterates backwards through the history. However, if I start typing a command, like b, instead of iterating only through history ...
havakok's user avatar
  • 249
1 vote
1 answer
176 views

In bash want to re-edit a multiline command (that I invoked previously) with Ctrl-x Ctrl-e. This will open vim (for me) and letting me type the command. Now with all the bells and whistles set (ref): ...
glades's user avatar
  • 126
0 votes
1 answer
110 views

NOTE: I plan on answering my own question. This is the last command I ran on the command line: git co head -- a/path/to/a/file.ts I want to run this a few more times but with different file paths for ...
Daniel Kaplan's user avatar
0 votes
1 answer
143 views

I have a question about the .bash_history file. First of all which one? Because there's one called .bash_history in my home, and then a bounch of other .bash_history-xxxxx.tmp where every x is a digit....
user avatar
-2 votes
1 answer
104 views

Why does the Bash setting on duplication affairs not work? In .bashrc: export HISTCONTROL=erasedups:ignoredups It keeps recording ie. writing every command typed in CLI into .bash_history EDIT : That ...
user17227456's user avatar

15 30 50 per page
1
2 3 4 5
52