The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
15 views

bash: opposite of “histignore” behavior

I am looking for a way to ignore every command by default, unless I specifically want to save it in history. Ideally, saving a command should be as easy as prepending it with a space.
0
votes
1answer
36 views

Seeing actual commands typed in bash history

Is it possible to retrieve the actual commands typed in a bash history? If the command involved (for example) a history substitution or modifier, what is seen in the history is the resulting command ...
1
vote
0answers
39 views

Bash - log every input and output and write to file

I am often on assignment and sometimes I forget to document my work. E.g. write down output from different one off tools. Is there a way to automate that via .bashrc? So I open up a new shell, it ...
1
vote
1answer
100 views

Difference in cd.. and cd .. (Change Directory) [duplicate]

cd.. and cd ... Basically, they are doing the same. But, who and why thought of changing it with space or without space? Why is there space and why there isn't space between cd and two dots? C:\...
0
votes
0answers
30 views

How do I get bash history for users running commands via PHP shell_exec()?

Is there a .bash_history or something similar stored out of memory when running shell commands via PHP's shell_exec() or backticks? PHP is running Cloudlinux+FPM multi-tenant where each user owns its ...
91
votes
11answers
88k views
0
votes
1answer
25 views

executing history command as another user

I am confused as to why I'm having problems executing a history command as another user to return all that user's history - I need to loop though all users and get their history cat /etc/passwd | awk ...
1
vote
1answer
51 views

CTRL+R in shell - if I go past the command I want, how do I get back to it?

I'm feverishly hitting CTRL+R to find some command I used awhile ago, when suddenly I get to it. By reflex, I continue hitting CTRL+R, passing it for something further back in the shell history. How ...
1
vote
2answers
265 views

Repeat last command matching “two words” zsh

I want to repeat the last command that matches foo bar. Using !! doesn't work (it's not the last command I used), and neither does !foo, because my history looks something like foo bar dee zep foo ...
18
votes
2answers
9k views

Command history in zsh

Currently I have zsh set up in such a way that command history is shared between all sessions immediately. Say I have a terminal emulator open with two tabs, each with a zsh session, A1 and A2. If I ...
16
votes
3answers
2k views

Separate up arrow lookback for local and global ZSH history

Is it possible to... Step up local ZSH shell history (actions only happened in that prompt) Step up global ZSH history (shared history is on) - default what happens when you press UP arrow when ...
0
votes
2answers
557 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 ...
0
votes
1answer
56 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 ...
3
votes
2answers
562 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
41 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
101 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
40 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 ...
3
votes
0answers
416 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.
2
votes
1answer
164 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 ...
2
votes
2answers
821 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.
1
vote
0answers
18 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
469 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 ...
2
votes
1answer
77 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 ...
0
votes
3answers
327 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
2k 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 ...
32
votes
2answers
9k views

oh-my-zsh history completion

I have recently switched to zsh, using robbyrussell's oh-my-zsh. Before that i used bash with a lot of custom stuff and i am only missing one thing because zsh is trying to be 'too smart': If i type ...
6
votes
4answers
9k 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
2answers
703 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 ...
2
votes
1answer
518 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
45 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
623 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
146 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
340 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 ...
14
votes
3answers
3k views

How can I add a command to the Bash history without executing it?

Every now and then it would be useful to add a command directly to the history in Bash without actually executing it. So far the closed thing I have found is adding a # in front of it and hitting ...
3
votes
3answers
4k 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 ...
2
votes
1answer
3k 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 ...
0
votes
0answers
130 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
94 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
94 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
156 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 ...
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
1answer
2k 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 ...
1
vote
1answer
321 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 ...
4
votes
1answer
103 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
92 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
49 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?
1
vote
1answer
131 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
202 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 ...
5
votes
2answers
388 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 ...
9
votes
1answer
404 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, ...