The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
3answers
36 views

Scroll through shell history based on command or stub/stem?

Please forgive my ignorance.... I have a history of commands in Bash on OS X and Linux. At times, I want to go back to an item based on the command. For example, suppose I previously entered: make ...
2
votes
1answer
49 views

zsh doesn't log not found commands to history [duplicate]

There's a way to setup zsh to not save commands not found to history ? For example, if by mistake I type: got push instead of git push then got push entry is added to history file, how to stop ...
0
votes
0answers
29 views

Accidentally partially deleted home directory . . . Killed with ctl-c, which file is corrupted?

I was running some software in my home directory (last time I do that!). Stupid config file asks what directory I wanted to put my output files. I accidently used ~/ as my output directory. It ...
2
votes
0answers
139 views

How can I have an unlimited history in zsh?

I want an unlimited history file in zsh. As far as I know I can only set HISTSIZE and SAVEHIST to a big number.
0
votes
1answer
54 views

Sensitive info in Powershell and/or cmd invocations

I want to run commands from Powershell and/or cmd.exe on a Windows host. These commands might accept, as parameters, passwords which should not be saved anywhere. These scripts may need to run from ...
2
votes
1answer
78 views

Incorrect output of history command of ssh. How to read the timestamp info correctly

I set the HISTTIMEFORMAT variable to store the timestamp info .bash_history file. I am able to display the history properly if I use interactive shell. But, when I run history command to display ...
1
vote
0answers
15 views

Serial Port output history?

Is there a way I can go back and view previous serial sessions I have had? I use cu on ubuntu to open the serial connection. I need to see if I can find a traceback on my cisco router. thanks
3
votes
3answers
441 views

Is there a way to stop terminal from saving commands?

Well, the thing I'm tired of clearing my terminal history again and again. So I was wondering if there's a way that the terminal doesn't record your history or the commands you've used. If not, is ...
0
votes
0answers
16 views

Find history event by prefix with a hyphen

I often have to use commands that have a hyphen in their names and differ only in the part following the hyphen. I am used to using bang-history expansion, but there is a problem with how zsh handles ...
2
votes
1answer
56 views

How to access history of all Emacs commands?

I see that there is a way to access the history of the minibuffer. I was curious if there is a way to see a history of every action in Emacs, besides just the complex ones. My purpose is to save these ...
3
votes
2answers
245 views

Automatically export history at end of powershell session

I can export my Powershell history using the scripts outlined in the Technet page on the subject, Get-History | Export-Clixml ~\PowerShell\history.xml and I can automatically load up the saved ...
0
votes
3answers
136 views

Is there a way to determine which user ran a command in bash history?

We work on CentOS servers available to over a hundred employees via SSH, each with their own login. Running a normal history bash command shows all of the commands ran by all of the employees, however ...
0
votes
2answers
1k views

Why does “cmd /k” reset/clear/delete command history?

Can anyone explain why cmd /k clears the command history of my window terminal (CMD). When I run a batch file within a previously CMD and I put cmd /k at the end of the line, the command history will ...
2
votes
1answer
460 views

How to make windows 8.1 command line save commands history?

Exist a way to automatically save command history on windows 8.1 command line and have it available after close and open the command line program?
0
votes
1answer
41 views

How can I enable preserving of the run dialog box history in Windows XP

On my PC (Windows XP), the "Run" dialog box does not keep the history of previous commands till the next time my computer is restarted! So no suggestions are shown when a command is entered after ...
2
votes
2answers
503 views

In Windows Command Prompt, how to get the last command that started with some letters?

Let's say I entered a bunch of commands one after another: rm blah.txt pwd ls cd .. cd blah pwd If I want to get "rm blah.txt" to appear again without typing the whole thing again, I can press up 6 ...
0
votes
5answers
127 views

History in bashrc on login vs manual sourcing - clearing and loading

I use a bunch of different aix machines at work and need to share users with co-workers. To make my life easier but not bother others with my customizations, I have created a .bashrc file that I copy ...
0
votes
1answer
285 views

How to port my current bash history over when opening a tmux session?

I often find myself in this situation: I start doing something in a terminal. I need more terminal space, so I open tmux. History is gone, even the commands I wanted to run inside tmux. How can I ...
2
votes
1answer
2k views

How do I change the .bash_history file location?

I'm running CentOS 6.x and want to move the .bash_history to a different location. The home directories of my users are (because I run a VPS) in /var/www/vhost/<domain>.<tld> which is FTP ...
2
votes
2answers
517 views

Bash is losing history even though shopt -s histappend is set

I lost all commands that were executed from the last session - they do not show up in history at all. What needs to be done to prevent this?? I had added shopt -s histappend just for this ...
0
votes
0answers
128 views

Bash History Under OS X (Mavericks)

Why does my bash history under OS X never seem to persist for more than an hour or two (or a day, at most)?
0
votes
3answers
84 views

Disable repeated items in bash history

Bash in Fedora 19 is really annoying me. Say I run a command: echo "Hello" Then I run another command: echo "World" Now I run the last command (echo "World") again N times by pressing up on my ...
2
votes
1answer
87 views

How to disable the confirmation of history expansions like `!!`

Zsh takes real good care of me, and at times it can get a bit too much. One of the times where I'd rather have it stay out of my business is when it "wants to make sure I want to execute the given ...
2
votes
1answer
132 views

Use a separate history for 'read -e' (readline)

I would like to write an interactive command shell in shell script, for easier adjusting of the iptables firewall. The problem is, that read -e uses the shell history. Is there a way of using a ...
1
vote
1answer
1k views

Notepad++ Undo History wanted

I cannot seem to find a history in Notepad++ showing you all the actions you did. Sometimes you might not be sure anymore what the next Undo action would do. Does this feature really not exist or I ...
4
votes
1answer
97 views

Shell history support that doesn't suck?

When I use multiple terminal sessions at once, bash only persists the commands from one of them. Then later when I try to do a reverse command search, the command I want is not going to come up, ...
1
vote
2answers
85 views

Logging in over ssh in a different session?

I don't know exactly what the correct term is, but I notice if I log in to a remote SSH server, then close the window, open a new one, and log into that server again, my bash history and user ...
1
vote
2answers
48 views

How to see history of commands entered as superuser

Is there a way to see the commands that I entered in su mode? Similar to the ~/.bash_history? Where would this be located?
0
votes
2answers
462 views

“history position out of range” when calling history from bash script

I want to make a simple script to delete a line from bash_history, based on user input of the line number. echo -n "Delete History Line Number: " read num history -d $num The error is "history ...
1
vote
1answer
290 views

Terminal history in auto-completion

I am running Ubuntu 12.04 LTS and for some reason there is no terminal history (hitting the up arrow for the previous command), nor is there auto-completion (hitting the tab key). These wonderful ...
1
vote
1answer
129 views

Making bash command history act like Windows command shell

In bash, up arrow recalls the previous command. Tap it twenty times, I get the command from twenty places back in history which I ran five minutes ago. Suppose I run that command right now. Now when ...
0
votes
2answers
181 views

Is it possible to see commands that user have run over ssh?

I am running a ssh-service on my computer and clients connect to it from all over the network. Is it possible to see the commands that people have run on my computer? for example a user connects to ...
2
votes
2answers
765 views

Remove Internet Explorer Address Bar URL History from Run dialogue?

How do I prevent Internet Explorer's address bar's URL history from showing up in the Run dialogue? No tweak seems to prevent this. I'm running Windows 8.
8
votes
1answer
357 views

How can you reverse the direction of alt-period in Bash?

In Bash, you can press Alt-. to insert the last argument of the previous command. If you press it multiple times, it cycles through the last arguments of all of the commands in your history. However, ...
6
votes
4answers
1k views

How to selectively navigate through Bash command history on a Linux terminal [duplicate]

Everyone knows (or should know!) that on a terminal the up and down arrow keys are used to navigate through the history of used commands. When you use the terminal on a daily basis, your command ...
2
votes
1answer
2k views

How to log bash command with its output?

I want the actual command line be logged together with its output. I routinely execute important commands like this: PERL5LIB=${PERL5LIB}:/something/extra my-command.pl many arguments which I want ...
1
vote
3answers
221 views

Copy all users' .bash_history in one go

Is it possible to use cp to copy every user's .bash_history file into the same folder (with the username appended)? Or is it at least possible to copy them into a parallel set of folders? I can't ...
0
votes
1answer
674 views

How to set history length for msys?

On my Debian VM I'm setting the $HISTSIZE and $HISTFILESIZE (and other history related environment variables) on system start / profile load: ~/.profile export HISTSIZE=100000 export ...
3
votes
4answers
263 views

Unix-like command-line shells: Get full command input/output history

I'm looking to see if there is some smooth way (that is, not me just writing a wrapper for the shell) to get full logs of both everything I enter into the command-line shell and everything that gets ...
5
votes
4answers
7k views

To know which IP executed a certain command in linux using ssh

There is a server which is accessed by many users using ssh. I am trying to figure out which user executed a certain command. I can know the list of users currently accessing server using who Also I ...
3
votes
3answers
3k views

bash save history without exit

in linux ubuntu bash terminal. is there any way to save bash history without writing exit? i've set the config to "HISTCONTROL=erasedups" which in my opinion works better than ignoredups. anyways ...
1
vote
1answer
196 views

put in bash or zsh history absolute path to files I working on

I have found that in bash i frequently use something like that: vim ./somefile1 less less ./dir1/dir2/somefile2 cp some_other_relative_path_to_file and so on After that when I trying to find a ...
2
votes
3answers
477 views

How to start bash and immediately “type” command into it?

I want bash to first execute a command, but after the command finishes (or Ctrl+C'ed) go into interactive mode (preferrably with the command in history, available for up). How to attain it in easiest ...
2
votes
1answer
182 views

How to enable the bash history only caching commands that are acutally in path?

Having a bash history enabled is a security risk, because when you accientally enter your password into the bash the password gets stored in the bash history. To prevent this a good solution would be ...
1
vote
1answer
689 views

How to enable command history in Run, without enabling recently opened programs history in start menu?

I want to enable command history in Run dialog box, without enabling recently opened programs history in start menu? (!) This previous answer will enable history in both Run and Start Menu (recently ...
1
vote
1answer
5k views

How to enable command history in Run command dialog box? [duplicate]

Possible Duplicate: Enable history for Run dialog for Vista administrator In my PC (running Windows 7 Professional - 64 bit), the Run dialog box does not keep the history of previous ...
3
votes
2answers
432 views

Vim-like history in bash?

In bash, it's possible to scroll through the command history using the up and down keys. In vim, this is also possible (after pressing :). But with vim, if you type the first few letters of a previous ...
3
votes
1answer
262 views

How to log in which terminal session a zsh command was run

In zsh's history file, all commands are logged from all terminal sessions. Is there any way to log in which terminal session a command was run (i.e., a unique identifier for this instance of the ...
3
votes
2answers
606 views

Delete current command

Is there a keyboard shortcut to delete the current command? Let's say I have: $ cp /home/one/two/tree/ /var/www/one/two/three I want to easily the current command, specially when it's long and I ...
5
votes
2answers
348 views

Change the order of Windows shell command history retrieval

One of the things that drive me crazy in command line under MS-Windows is the order in which the Windows shell (both the standard one and PowerShell) retrieve commands from history when you use the up ...