Skip to main content

Questions tagged [command-history]

Questions relating to the command history features of command-line shells like Windows' CMD and Bash on Unix-based systems - features that store and deal with previously-executed shell commands.

0 votes
0 answers
41 views

Store output of command history

Is there some way to record not only the commands that I type in my terminal, but also their ouput? Is there maybe something that I can add to my .bashrc that could act similar to passing all commands ...
TheFibonacciEffect's user avatar
0 votes
0 answers
691 views

How can fzf's command history search always be shown, automatically and without CTRL-R?

With fzf you can press CTRL-R to have a command history search box shown below the prompt and fuzzy search. I want it shown automatically for each new prompt, without having to press CTRL-R.
Oneechan69's user avatar
0 votes
0 answers
48 views

How can I complete individual command line phrases / do partial completion with fzf?

With fzf I can press CTRL-R to search my command history but it completes the whole command. What I'd like is to just complete the current argument, the next phrase before the next space. Can this be ...
Oneechan69's user avatar
0 votes
2 answers
365 views

Echo the exact command used to start a Bash script

I'd like to give feedback to the user of a bash script along the lines of "You've run the following command <exact command the user entered>, better to run it like this <better command&...
Johannes Bauer's user avatar
0 votes
2 answers
647 views

How to configure the user's terminal history in Synology DSM?

The history is limited by 100 entries. In other Linux distros I can configure that in the ~/.bashrc of my user. But in DSM I found no such a file. So, how to set the $HISTSIZE and the $HISTFILESIZE (...
automatix's user avatar
  • 1,425
0 votes
0 answers
64 views

in bash: how to execute automatically a command when any commamd is invoked, like by PROMPT_COMMAND, but not awaitng next prompt?

Now I use the PROMPT_COMMAND to automatically execute "history -a" to append the history list to HISTFILE. As suggested in many internet articles. Additionally I have arranged that after ...
Anton Wessel's user avatar
0 votes
0 answers
145 views

How to check what is controlling/restarting a Windows Service or view its errors?

There are services which can be found in services.msc As example, WlanSvc the WLAN AutoConfig. How can I check which "thing" initiated a Stop or a Restart on a service? With "thing"...
karl-police's user avatar
0 votes
1 answer
240 views

In Bash, how can I read the value of readline variable named `history-size`?

My Bash version I have updated from v590 to version 5.2.15(1)-release (i686-pc-linux-gnu). I use Kubuntu 20.04 and KNOPPIX 9.1. The readline variable history-size can be set to on or off, can be bind ...
Anton Wessel's user avatar
2 votes
1 answer
1k views

Configure Visual Studio Code to share same terminal history from zsh?

I use both the built-in terminal of VScode + terminal (zsh) on Mac. I'm under the impression they used to share the same history but not anymore. Ideally a command I type in either would be ...
Fabiano Soriani's user avatar
0 votes
0 answers
503 views

How to log Linux commands ran from a script?

I am able to log commands executed on bash shell using export PROMPT_COMMAND='history -a > ..... , but this wont log commands executed from within a shell script. Is there any way to log command ...
Harish Reddy's user avatar
6 votes
2 answers
5k views

Powershell history isn't persistent anymore

Powershell stopped using its persistent history (Windows 11). When I start a new Powershell instance commands from previous sessions don't show up. Once I use commands in the new session for the first ...
Albin's user avatar
  • 10.9k
0 votes
1 answer
153 views

PowerShell falling short on performance when wildcard used multiple times for deleting files matching specific filename patterns

As I mentioned in Q-title, I have put together fairly well-built function for clearing history completely (not keeping any ugly junks or leftovers). But it seems that due to multiple occurrences of ...
Vicky Dev's user avatar
  • 472
0 votes
1 answer
363 views

zsh is not completing multiple commands with up arrow

Im using zsh with this plugin: zsh-history-substring-search When I type for example sudo pacman <UPArrow> It show some commands starting with sudo pacman, but it also show command starting only ...
T0maas's user avatar
  • 181
1 vote
1 answer
979 views

deleting history in server using history -cw

I have deleted my history in server as a user history -cw Will this delete history for all users including superuser and will he see that I used the history -cw ?
nolymp's user avatar
  • 13
3 votes
2 answers
18k views

Is there a way to view or store file history (like browser history) in Linux?

Is there any way to "view" (or) "store" file history (similar to browser history). For example if I have 10 files, and I open 2 of them, the following 2 details should get stored ...
kkk's user avatar
  • 33

15 30 50 per page
1
2 3 4 5
10