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

learn more… | top users | synonyms

3
votes
1answer
69 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 ...
-1
votes
2answers
40 views

how can i use command history in a bash file

i try to use "history" command in a bash file .sh but it didnt work with me how can i use it the code of the bash file #!/bin/bash # Copy history to file history #cd ...
0
votes
0answers
14 views

How I can transfer skype history from Windows to Ubuntu? [duplicate]

How I can transfer skype history from Windows to Ubuntu? I tried to copy main.db file from Windows to Ubuntu (/home/.Skype folder) but when I run Skype, it's shutdown. I find this answer Transfer ...
0
votes
1answer
17 views

Get Activity Log in Linux

I don't know what was the size of files and in which folder they were put.but my little brother copied some files from one folder to another one.I am unable to get those files back.Is there any way so ...
0
votes
0answers
21 views

Is there a terminal solution for recent visited files?

This post where are the files and dirs "recently used" stored? shows that some file stores the recently visited files by GTK3 applications. Is there a solution for recently visited files ...
1
vote
1answer
36 views

How to enter part of a command automatically, after another command executed?

I want to create a function for grep-ing my command line history by history | grep {keyword}. And after seeing the list and choosing the command by line number ,I want to execute it by !{line_number} ...
1
vote
1answer
21 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?
3
votes
1answer
74 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 ...
1
vote
2answers
85 views

Reset History inside a bash script [duplicate]

I want to make a bash script that clears the history i.e. works similarly as the command history -c So I started with the following code:- #!/bin/bash history #displaying history history -c ...
2
votes
1answer
30 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
21 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
62 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
482 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
36 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
95 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
29 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
50 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
176 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
46 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
39 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
43 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
616 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
163 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
55 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
90 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
430 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
222 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
208 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
2k 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
436 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
129 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
594 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 ?
1
vote
3answers
809 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
310 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
181 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
14k 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
375 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
1k 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
4
votes
4answers
643 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 ...
2
votes
0answers
61 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
250 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 ...
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
613 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
2answers
800 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
3answers
501 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 ...
5
votes
3answers
5k 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 ...