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

learn more… | top users | synonyms

48
votes
9answers
105k 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 ...
2
votes
1answer
23 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 ...
0
votes
0answers
13 views

How can I `turn on and off` the functionality for dmesg?

I have used dmesg -c to clean the history but as I go to /var/log/. I found the file dmesg and the records in it remain. It's terrible. The wifi connection information is massive and bothering. I ...
2
votes
1answer
52 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 ...
3
votes
0answers
73 views

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

Is there an extension of some kind which ties Bash's history search (which you get with CTRL+R in a terminal) into the Ubuntu search suggestions generated when searching via the Windows key (in ...
0
votes
1answer
77 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 ...
24
votes
2answers
7k 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 ...
0
votes
2answers
35 views

Which page opened a tab in firefox?

While searching on well known and reliable pages, I suddenly had a new tab in firefox open with offending content. I closed the page, but it is still visible in the history of firefox. I want to ...
0
votes
3answers
48 views

key-shortcut accessible command-history (in gnome-terminal) for irssi sessions needed!

I use gnome-terminal in combination with irssi and I am wondering if there's anything like .bash_history logfile for irssi, that can be used/implemented/set up, that enables one to retrieve previously ...
1
vote
1answer
28 views

where does the discrepancy between \# in PS1 and n in !n come from?

Something has been gnawing at me for a while now and I can't seem to find a relevant answer either in man pages or using your 'Don't be evil' search engine. My .bashrc has the following: shopt -s ...
4
votes
2answers
4k 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 ...
0
votes
1answer
40 views

How do I enable automatic history expansion for commands using 'magic space'?

I read on a blog somewhere about the possibility to use automatic history expansion before actually executing a command or even pressing the enter key in the command line. It involves the ...
0
votes
2answers
93 views

SOLVED BleachBit: How to Completely Clear URL History in Firefox?

14.04 / Firefox 29.0 I've been using Bleachbit to clear usage/file history, and for the most part it works great. However, it doesn't seem to clear the website hostnames out of the URL, at all. ...
34
votes
3answers
14k 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 ...
0
votes
0answers
26 views

network history doesn't work

I am aware of Why doesn't System Monitor show activity over ethernet connections? and it worked in ubuntu 14.04 , but I have the same problem now that I went back on ubuntu 12.04 LTS and ...
1
vote
0answers
38 views

How to find the directory on which a particular command is executed? [duplicate]

I already installed nautilus-open-terminal package. So i can openup terminal from any directory. Like that i opened a terminal from a directory(i forgot it's path) and executed apt-get download vlc ...
13
votes
4answers
603 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 ...
0
votes
1answer
33 views

how to see what was updated in last update

Recently I downloaded automatic updates which Ubuntu offered me automatically (Classic "Confirm, confirm, OK... done" without actually reading what is being installed) I feel like that as result of ...
0
votes
2answers
3k views

How to delete history of Totem and Gedit in gnome shell?

How can I delete history of Totem and Gedit in gnome shell? I can not find a menu option to do this, unlike in gnome 2.
0
votes
0answers
13 views

Show the history of removable devices in Linux [duplicate]

I just wanted to see the history of all the removable devices (Pendrives,etc) if any plugged into my system. Just like the history command which tells the history of commands executed on terminal, is ...
0
votes
1answer
270 views

get list of all commands run in past with sudo apt-get install in terminal

As per command history in Ubuntu terminal we can see all previous command we run on system. I want to know how can we get all previous command which starts with some words/characters. Example : i ...
1
vote
1answer
86 views

List all manually installed packages similar to history.log file

I searched the whole internet for this but did not find any satisfactory answer for this question. aptitude search ‘~i !~M’ | less does not show the manually installed packages. On my system it ...
1
vote
1answer
47 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 ...
0
votes
2answers
206 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
335 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 ...
3
votes
4answers
457 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 ...
7
votes
2answers
317 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
140 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 ...
30
votes
3answers
20k 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?
1
vote
1answer
137 views

How to clear recent history in Xubuntu 12.04

First, I know how to do it in Ubuntu. I could use Activity Log Manager to clear recent history. However, it does not work on Xubuntu 12.04. The "recently used" history is always there after I tried ...
3
votes
3answers
3k 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 ...
1
vote
0answers
20 views

Files which tell that someone has accessed your computer [duplicate]

I know /var/log/auth.log shows who has been using sudo commands and /home/myusername/.bash_history shows command line commands. I would like to know if there are any more files similar to these 2 ...
1
vote
0answers
71 views

Display list of most used commands [duplicate]

The command history will display the list of commands I used before. Now: How could I know the most used commands? Also how to count number of times I used each command? For example: If I use ...
1
vote
1answer
1k views

Save the terminal history to a file for print

My Ubuntu headless server is about to lose both hard drives(raid1). I already saved the most important stuff. Now I'm sitting in front of a Mac OS X client with the terminal open (ssh). I need to ...
1
vote
3answers
542 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 ...
3
votes
2answers
116 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 ...
2
votes
0answers
36 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.
3
votes
3answers
341 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 ?
0
votes
0answers
25 views

Need to determine the bootup history of ubuntu

I need to determine all the times ubuntu has been booted up and a log of all the applications that were used. Something equivalent to history on browsers. How do I do it. Any help will be highly ...
2
votes
1answer
651 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 ...
12
votes
3answers
8k 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.
1
vote
2answers
162 views

Prevent user from executing history -c command in shell

Is it possible to prevent specific user from executing history -c command in shell.
1
vote
2answers
300 views

Where does the software-center store its history?

The Ubuntu software center is able to display a detailed history of packages installed /updated/removed according to date. Where does it get this info from? (/var/log/dpkg.log is maintained only ...
1
vote
1answer
881 views

How do I clear Software Center History?

I have old software center history from way back in June and I would like to clear it all but I have tried sudo rm -rf /var/log/apt/history.log /var/log/dpkg.log ut it did not work
1
vote
0answers
48 views

How can I increase the viewing history (recent documents) in Okular?

I tried looking for an entry/number in ~/.kde/share/config/okularrc but there was nothing to edit there as to allow me to increase the number of saved addresses
0
votes
1answer
229 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 ...
0
votes
1answer
43 views

Getting log file of system ON & OFF history

How i can get the log-file of Ubuntu 12 Shutdown, Restart and Start history , I tried with "last UserNanme" in terminal but not getting the data i want, Please help me to find the log file .Thanks in ...
10
votes
4answers
6k 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 ...
6
votes
2answers
4k 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 ...
13
votes
4answers
518 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 ...