The history command can be used to retrieve the the commands you have previously typed in a shell.

learn more… | top users | synonyms

37
votes
3answers
16k 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 ...
60
votes
8answers
131k 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 ...
4
votes
1answer
1k views

How can I delete the command line history from the dash?

When accessing the command line by pressing Alt+F2 it opens the dash and displays a history of previous commands which have been entered. How can this history be removed? I've tried using Activity ...
21
votes
5answers
9k 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.
2
votes
2answers
845 views

Gedit 3.6.1, how to increase the number of recent files from its default of 5?

Ubuntu 12.10, gedit 3.6.1 This won't work: gconftool-2 --type int --set /apps/gedit- /preferences/ui/recents/max_recents 30 Modifying this file as root won't work either: cat ...
3
votes
3answers
678 views

History command showing the directory and the date

Is there a way to have in the .bash_history file, listed: the directory where the command has been typed, the date, and the command ?
36
votes
3answers
24k views

Show apt-get installed packages history via commandline?

Is there a way to show the history of installed packages that were installed by apt-get via commandline?
3
votes
2answers
8k views

How do I check if someone accessed my computer?

I need to check the list of files accessed in my computer (ex: yesterday on particular time). Is it possible? Or I need to check whether anybody accessed my computer (when I left it unlocked) or ...
31
votes
2answers
8k 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 ...
8
votes
4answers
16k 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
412 views

What's the history of Ubuntu?

What is the history of Ubuntu? How did Ubuntu originate? Who were the people involved?
15
votes
1answer
5k views

How do you share history between terminals in zsh?

How can it be achieved so that every command that is entered, is visible in every open terminal's history? When having multiple terminals open, the history isn't shared, i.e. what you entered in one ...
7
votes
2answers
475 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 ...
3
votes
2answers
2k views

Install history command package

I have Ubuntu 10.04.4 LTS running on a proxmox OpenVZ container. I imagine it does not come with history because the up arrow on the command line gives me ^[[A plus... $ history -sh: history: not ...
5
votes
2answers
2k views

Deleting last few hours of zeitgeist history like in Firefox?

I want to open secret files on Ubuntu Natty and after my work delete the history of open files or any recorded activity during last: one hour three hours one day one week etc... how can I do this, ...
2
votes
1answer
72 views

How do I make sure that I have received a fix for a bug?

The symptoms of my computer crashing was very similar to those reported in the comments section of a particular bug in an application that I download and get updates via a ppa. Recently, the ppa's ...
1
vote
1answer
22 views

Entries in history

I usually include the password when I log in to MySQL. How do I exclude mysql -u root -pPassword being picked up and stored by history?
0
votes
2answers
528 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 ...
0
votes
2answers
400 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 ...