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

learn more… | top users | synonyms

124
votes
8answers
6k views

Terminal 'incognito mode'?

I use Terminal a lot, and sometimes I am running commands, which aren't things I don't want others to see, but more commands that if I accidentally arrowed up to and accidentally executed would cause ...
75
votes
8answers
176k 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 ...
47
votes
3answers
31k 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?
45
votes
3answers
20k 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 ...
36
votes
2answers
10k 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 ...
26
votes
4answers
11k 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.
20
votes
4answers
29k 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.
19
votes
2answers
6k 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 ...
14
votes
4answers
866 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 ...
13
votes
4answers
645 views

Run last command with all the letters transformed to lowercase

Many times I have run a command with all the letters in uppercase (maybe because CapsLock was on), and I pressed Enter before realising this. How can I run the last command with all the letters ...
12
votes
8answers
1k views

Ubuntu Philosophy Question [closed]

I was just switching from Windows to Ubuntu and I started to read this. And there were quite a few things I did not understand. One was: "OpenOffice decided not to have a learning curve" ...
11
votes
4answers
8k 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 ...
11
votes
2answers
1k views

Who named Ubuntu? [closed]

It is said Linux was named by Linus Torvalds who had created it. And is reported Linux means 'Linux Is Not UniX.' It is wondered who and why named Ubuntu to publish it by book. Would you explain?
9
votes
4answers
22k 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 ...
8
votes
2answers
6k 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 ...
7
votes
2answers
697 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 ...
6
votes
2answers
98 views

Using last part of command for next command

When using the command I know a friend of mine who used to re-use last part of previous command. He unfortunately moved far away and I can't get hold of him. First: cp -r folder ~/folder Then he ...
6
votes
2answers
8k 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
1k views

How do I disable the command line history in the dash?

Using Unity, how to clear and disable the RUN (ALT+F2) history? Not the dash history, not the search history --- the ALT+F2 "run" history. The Privacy Settings Applet of System Settings doesn't seem ...
6
votes
1answer
2k 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 ...
5
votes
2answers
13k views

How do I SSH and remove all previous SSH activity history?

I want to remove any and all activity logs for SSH remotely. How do I get to it? My account on the remote server doesn't have admin privilege, and as such I just want to remove user to user ...
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, ...
5
votes
3answers
8k 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 ...
4
votes
4answers
1k 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 ...
4
votes
3answers
180 views

View history of commands ran in terminal

Is there a way to save all my typed terminal commands and view it like history in a log book?
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 ...
4
votes
1answer
107 views

Blank line in my bash.history?

I was taking a look at my .bash_history, and I found a blank line. I thought that I could have pressed "enter" while I was taking a look in the file. Is that normal? Or maybe I really pressed enter ...
4
votes
1answer
608 views

How to delete Gwibber history?

How do I delete Gwibber history in 11.10? I deleted the account and created the account again, but some of the tweets deleted on the web still appear on Gwibber.
4
votes
1answer
1k views

Increase or View all Stored History in Gedit

I would like to be able to see the last ~200 files opened in Gedit. I was able to increase the number it shows to 40 using this command: gconftool-2 --type int --set ...
4
votes
1answer
1k views

Delete Alt-F2 history [duplicate]

Possible Duplicate: How can I delete the command line history from the dash? Can anybody tell me configuration or file address where it is (on GNOME 3). On gnome2 it was in config ...
3
votes
2answers
2k views

Bash history not saved after closing terminal

I recently replaced my Ubuntu 14.04 installation with Ubuntu Gnome (which comes with Gnome DE). But I noticed that bash history is not saved once the terminal session is closed. Once I close a ...
3
votes
3answers
1k 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 ?
3
votes
2answers
9k 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 ...
3
votes
1answer
346 views

Clear Linux file system after shutdown / start

I have very specific task. I need to clear the desktop, downloads, documents and so on after every shutdown or finish. For example, if anyone downloads something using Google Chrome, he will work ...
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 ...
3
votes
1answer
38 views

How to show all files created on a specific date

On 16/05/2015 at 17:18 I visited a malicious website. And I suspect a drive-by-download, so I want to check my machine to see since that time in order of creation which files have been created or ...
3
votes
1answer
110 views

How to quickly check the value of bash variables, aliases and history commands from terminal?

How do you expand in place: bash aliases environment variables history commands to edit them and check they are correct? For example, I have some aliases I use for flashing different devices and ...
3
votes
1answer
43 views

What mean numbers in output of history

Output of history command looks like this: 1975 mkdir adrnln/work_dump 1976 ls 1977 code What does numbers on the left side mean? Is it true that commands entered for example on Monday will be ...
3
votes
2answers
156 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 ...
3
votes
1answer
2k 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 ...
3
votes
1answer
407 views

How can I see the last time a program was run?

Is there any way I can see what programs were running at a specific time? Is there a way to see the last time a program was run? I'm trying to see if a certain program was running yesterday because ...
3
votes
3answers
1k views

Is there a desktop-wide privacy mode?

With Zeitgeist now tracking everything I really think we need a privacy mode like the one Firefox offers. There is a ridiculous amount of history and caches being stored in Ubuntu from thumbnails to ...
3
votes
1answer
141 views

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

Bash has a great incremental history search with CTRL+R. However, using that is evidently tied to being in a bash. Ubuntu, on the other hand, has this nice global search tied to the Windows key (in ...
2
votes
3answers
1k 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 ...
2
votes
1answer
438 views

What's the history of Ubuntu?

What is the history of Ubuntu? How did Ubuntu originate? Who were the people involved?
2
votes
1answer
99 views

Incremental history searching

I found this very useful tip in UsingTheTerminal to use the arrow keys to search through the command history: "\e[A": history-search-backward "\e[B": history-search-forward "\e[C": forward-char ...
2
votes
2answers
2k 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 ...
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 ...
2
votes
1answer
50 views

I have Privacy: Record activity ON but how to view log and all the stuff? [duplicate]

Where can I find the recorded data and screen snaps and etc things ? I had tried to find them within : ~/.local/share/zeitgeist directory but there are the following files available and i don't ...
2
votes
0answers
39 views

How to delete list of played movies in Movie Player [duplicate]

Movie Player lists names of last few movies played. How to delete that list ? Going forward, I'll use VLC. But I'd like to clear that viewed movie history list.