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

learn more… | top users | synonyms

0
votes
0answers
11 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
49 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 ...
0
votes
1answer
49 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 ...
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
39 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 ...
0
votes
1answer
35 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
78 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. ...
0
votes
0answers
21 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 ...
0
votes
1answer
31 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 ...
13
votes
4answers
602 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
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 ...
1
vote
1answer
79 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
46 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
72 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 ...
7
votes
2answers
299 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
122 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 ...
1
vote
1answer
124 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 ...
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
898 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 ...
0
votes
2answers
191 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
114 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
284 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 ...
1
vote
3answers
470 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 ...
0
votes
1answer
257 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
2answers
155 views

Prevent user from executing history -c command in shell

Is it possible to prevent specific user from executing history -c command in shell.
12
votes
3answers
6k 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
280 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
825 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
3
votes
4answers
415 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 ...
1
vote
0answers
45 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
226 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
42 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 ...
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 ...
13
votes
4answers
506 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
1answer
622 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 ...
1
vote
2answers
385 views

How to clean gedit's and other editor's find&replace history?

I have started working on a new project using gedit on ubuntu 12.04. The problem i am facing now is that, all previously searched terms are still there when i click on the drop down arrow in search ...
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 ...
0
votes
1answer
172 views

How can I enable history completion by program in terminator as guake has it?

In guake I can type ls UP-ARROW and it will show ls /home/blah for example. In terminator using up arrow after typing ls just brings me to the command I entered prior. Is there any way to enable this ...
2
votes
2answers
887 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 ...
6
votes
2answers
96 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 ...
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
4answers
1k views

How do I prevent suggestions in the location bar in Firefox with history empty?

You know what I mean, when you type a letter in the internet browsers address bar it shows suggestions, like when you type y it suggests youtube.com. I believe this has to do with the history of ...
3
votes
1answer
290 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 ...
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 ...
0
votes
2answers
327 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 ...
48
votes
8answers
99k 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 ...