1
vote
1answer
30 views

Cannot seem to get bash history along with others working

This is very similar to all the other questions out there but at the same time not. I am running Ubuntu 12.04.4 LTS (GNU/Linux 3.2.0-59-generic x86_64) to be precise. I successfully setup a new user ...
3
votes
0answers
41 views

Bash History Search (CTRL+R) in Ubuntu Suggestions?

Is there an extension of some kind which ties Bash's history search (via CTRL+R) into the Ubuntu search suggestions generated when searching via the Windows key (in GNOME3)? Something that would just ...
7
votes
2answers
191 views

Get bash history to remember only the commands run with space prefixed!

The commands executed in the terminal prefixed with blank space(s) are not recorded in the command history file. But is there a way to get the reverse i.e. the history should only record those which ...
0
votes
3answers
52 views

How to clear history on logout

I tried adding history -c to ~/.bash_logout but seems not working. Add: I'm having success by adding these lines into my ~/.bashrc (referred from here) unset HISTFILE export LESSHISTFILE="-" I ...
0
votes
2answers
86 views

Logging of commands executed in Bash

Sometime back, we had a requirement to log commands run on the terminal in the Bash shell. This was solved by means of a startup script with essentially the following contents: #!/bin/bash ...
3
votes
2answers
80 views

There seems to be a difference between .bash_history and what up arrow displays, where does the up arrow get it's data?

I seem to have discovered that the ~/.bash_history file doesn't contain what is displayed when you use the up arrow. I found this by doing a command like so $smbclient -L 10.2.10.240 -umyuser ...
1
vote
3answers
195 views

How can I automatically rotate/archive my bash history logs?

I know that Bash has both HISTSIZE and HISTFILESIZE variables that control how long history is saved for, and how much of it is saved. I would like to keep an archive of my history. However, if I ...
11
votes
3answers
2k views

How to view the `.bash_history` file via command line?

I want to view the contents of my .bash_history file but don't know how to get there via the command line.
4
votes
3answers
3k views

How to delete selected results from history command?

history command shows all the results but we can filter to get particular command using history | grep searchingCommand. It is really helpful. But the problem is it shows those commands also which ...
2
votes
4answers
256 views

Select commands from bash history

Pressing the up button is tedious and I might miss the command I was looking for. So when typing history at the terminal gives me all the commands I have entered before, indexed to a number. Is there ...
0
votes
1answer
182 views

Bash history for root?

After installing 'ubuntu-desktop' on 12.04-LTS-server, the arrow keys work correctly for history navigation when the user is not root. However, for the root user, the arrow keys (for example, the ...
13
votes
4answers
383 views

How to get shared bashed history among different tabs

I used the answer in http://unix.stackexchange.com/a/1292/41729 to enable real-time shared history among separate bash terminals. As explained in the answer above, this is achieved by adding: # avoid ...
2
votes
3answers
2k views

Where are ALL ubuntu logs/terminal history stored

In what folders are the logs and key histories stored so that I may make a script to purge them. Is there a specific folder for the hibernation partition or a file by which it keeps the RAM data on ...
2
votes
2answers
557 views

No duplicated lines in bash history [duplicate]

Supposedly, adding export HISTCONTROL=ignoreboth to .bashrc would do the trick, but what I see in practice is there still exists duplicated lines in my .bash_history file. You can see my .bashrc ...
3
votes
1answer
3k views

How to save terminal history manually?

It's my understanding that the history file is updated when the terminal exits. But sometimes my computer crashes out, and the terminal doesn't exit cleanly, and then I lose those commands from my ...
6
votes
2answers
3k views

bash doesn't keep history

I run Ubuntu 12.04, and for some reason bash does not keep my command history. the ~/.bash_history file contains only 3 commands that I typed a few months ago. How can I fix this? EDIT: here's the ...
0
votes
2answers
269 views

History list without timestamp and unique the results

Using bash, I save my history with the timestamp. How do print the history omitting the timestamp? alias h=history alias g=grep -i To find lines that I used for heroku, I type: > h | g ...
34
votes
6answers
71k views

How to clear bash history completely?

I want to clear all before command from history of my server. I use history -c it seems all things are cleared but when I ssh to the server,all commands are still there. How can I clear them ...
6
votes
1answer
1k views

Is there a centralized history file for all the commands run from various terminals?

I am aware that every terminal has it's separate history,which can be viewed by the history command. Commands issued on suppose terminal tty1 will be shown in the history of tty1 only and not in the ...
1
vote
1answer
74 views

Graphical terminal misinterpreting input

I've been having this weird problem with typing commands into gnome-terminal. If the command takes up multiple screen lines and I use any backspaces and the stars are in proper alignment the command ...
7
votes
4answers
8k views

How to find history of shell commands since machine was created?

I created an Ubuntu virtualbox machine a couple weeks ago and have been working on projects off and on in it since then. Now I would like to find the syntax of some commands I typed in the terminal ...
2
votes
1answer
1k views

How can I set HISTSIZE for all users?

How can I set HISTSIZE for all users on Ubuntu 10.04? I've tried adding the following lines to both /etc/profile and /etc/bash.bashrc. I'm not sure I understand the difference between the two files ...
19
votes
2answers
5k views

Is it possible to make writing to .bash_history immediate?

I often open lots and lots of Terminals [Right now I have 7 open on this workspace] and I often search history with grep to find a command I've just written recently, but I don't want to hunt down the ...
27
votes
2answers
11k views

Bash history search, partial + up-arrow

I have searched, but not found anything on this. I am looking for a functionality in bash, using a terminal. Way back when, I had a user on a debian system, and a friend set me up with a convenient ...
10
votes
4answers
4k views

Bash command history not working

The command history between sessions is not getting saved. I'm using guake and the history for the session is working fine. I noticed that .bash_history had some commands I executed in sudo -s mode ...
19
votes
5answers
6k views

How to avoid duplicate entries in .bash_history

The same command is listed in my history again and again. How can I avoid this? I know it's possible via HISTCONTROL but I haven't found the right way.