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

learn more… | top users | synonyms

4
votes
1answer
2k 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 ...
39
votes
4answers
26k views

Bash history handling with multiple terminals

I use mainly Terminator, and it's usually opened with 3 split terminal windows. I also use Gnome terminal for various reasons. I'm wondering how is bash history handled in this case as I sometimes ...
72
votes
5answers
46k 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
votes
1answer
37 views

Putty SSH client command history? [duplicate]

I connect to my server via Putty SSH client. With the key ↑ I see previous entered commands, one by one. I just wondering is there a some command, which show all previous entered commands out of a ...
0
votes
0answers
29 views

No more history in dash. I want it back

I don't see the applications I used already in the dashboard. I went in settings -> privacy, and the history use was already set. I unset it and set it again (who knows). I even rebooted, but nothing ...
0
votes
1answer
13 views

Same commands execute when restart terminal

So, some time ago, I copied csv data from a webpage into terminal to save it to a csv file, like echo "field1,field2,field3,...,fieldn, with about 20 lines of text. I did this because I couldn't ...
44
votes
3answers
64k views

How to see time stamps in bash history?

Is there any way I can see at what time the commands were executed from the bash history? We can see the order but is there any way I can get the time also? Bottom-Line: Execution time in the Bash ...
1
vote
0answers
11 views

Record date when command was executed in the terminal? [duplicate]

bash_history lists only the previous commands executed. Is it possible to record the times ie. date when they were executed?
0
votes
1answer
84 views

How to run an anonymous terminal session?

This question by Paranoid Panda asks about incognito terminal use. This means history is not recorded in bash_history; so you can't access commands that were entered during that session. However this ...
103
votes
8answers
259k 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 ...
0
votes
1answer
34 views

Lost firefox tabs due to crash

I use the Save Session version 1.3.1.6.1 plugin in firefox to save my current sessions. I had kept 3 windows full of tabs for all almost a year when yesterday my firefox crashed. Now I can't find any ...
1
vote
1answer
30 views

How to record all modifications to directories, subdirectories and files in one session?

How can I record all the modifications to directories, subdirectories and files made during one session (ie. during login time)? For example, listing all the files/folders that were modified, and ...
1
vote
5answers
232 views

Creating command history list

Is there a way to display a list comprised of the last n terminal commands made by a particular user ?
-2
votes
3answers
46 views

Any way to see if a long running process bash command succeeded? [closed]

I have a long running process that was parsing text and my laptop died at some point because it was unplugged. I really don't want to unnecessarily run the process again because it takes over a day, ...
1
vote
1answer
79 views

How to remove command-line history from a specific time period?

How can I remove command-line history over a specific time period? Is it possible do so with only one command?
0
votes
0answers
22 views

Skype chat progress is not showing whole history when started

When I start Skype so it always shows up a window that is totally empty when I open a contact I have already written with. I always have to change the setting to From beginning so that I can see the ...
5
votes
4answers
15k 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
0answers
14 views

ubuntu 14.04 after reboot I lost last history of commands [duplicate]

I have Ubuntu 14.04 and I observed that whenever I reboot or had to force reboot (power off) the machine, I lose the history of commands. Normally I lose most or all previous session commands. This ...
1
vote
1answer
107 views

When I paste a command instead of typing it why does it not get added to history

If I type in a command it is preserved in history, but If I copy and paste a command from other place it is not preserved in history which is annoying if I have to run it again. I think this happens ...
205
votes
9answers
12k 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 ...
1
vote
2answers
28 views

Generate a log of all the installs on a system (whether apt-get/yum/pip/npm/…)

Is there a command (or specific syntax for history command) that generates (to screen or file) a log of all the installs on a system (whether they were through apt-get/yum/pip/npm/...). If possible, ...
2
votes
2answers
70 views

Get history of top 10 commands used [duplicate]

Is there any way to find out top 10 most used commands in history? Here top 10 means commands which I have used most of the time i.e. the commands whose used count is more than others.
61
votes
4answers
29k 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 ...
3
votes
0answers
87 views

missing .bash_history [closed]

I cant find .bash_history file in my home directory. I do: echo $HISTFILE /home/myname/.bash_history But if I try to list the file with ls, I get: $ ls -l ~/.bash_history ls: cannot access ...
5
votes
4answers
1k views

How to view history of apt-get install?

How can I view the history of apt-get install commands that I have manually executed? It seems to me that all methods available show everything that has been installed right from the start of the ...
2
votes
2answers
94 views

How to prevent commands being removed from history?

I have noticed that when I go up through my commands using the arrow keys, UP and DOWN, that if I then edit a command, it edits it in history, and I can even remove a command like that, however I do ...
6
votes
3answers
195 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 ...
46
votes
3answers
16k 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 ...
37
votes
5answers
17k 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.
0
votes
0answers
44 views

User account history showing incorrectly

I have found that in System Settings > User Accounts that if you select an account and then select the button called History (which is meant to show the login history for that account), it will ...
13
votes
4answers
672 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 ...
1
vote
1answer
601 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 ...
4
votes
1answer
62 views

What does '*' mean in the output to 'history' command?

I was seeing my history when I found a line with a * whereas, in general, the history has an output without any * I noticed this for the first time. When does this * appear and why? EDIT: ...
0
votes
2answers
92 views

history erase shell script not working

I am creating shelll script that is erase history of commands in the terminal. But the script is not erase the history of commands in the terminal. I follow below procedure 1. My script contains ...
2
votes
1answer
53 views

Pasted commands do not appear in history

when I use copy and paste to run a command, and later I want to run the command again it doesn't appear in history. Sometimes if I paste and then change some of the arguments the command does appear ...
10
votes
3answers
16k 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 ...
1
vote
3answers
50 views

History command in graphic interface of OS

Does Ubuntu store a history of command executed in the graphic interface (not in a shell session)? For example if, by mouse, I click on System Settings, then click on Network, do these steps ...
2
votes
1answer
49 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?
4
votes
2answers
11k 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
104 views

How to know the time of execution of previous commands [duplicate]

I know that using the history command I can view my past commands, but: Is there a way to view the date and time of the execution of those commands? Or is that kind of information not saved? And ...
0
votes
3answers
928 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 ...
3
votes
1answer
425 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 ...
-1
votes
2answers
1k views

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
2answers
243 views

How can I use history command in a bash script?

I try to use history command in a bash script but it didn't work. The code of the bash file: #!/bin/bash # Copy history to file history #cd /media/saleel_almajd/Study/linux/my_scripts/ echo ...
4
votes
3answers
3k 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?
25
votes
4answers
60k 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.
22
votes
2answers
8k 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 ...
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?
3
votes
1answer
64 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 ...
4
votes
3answers
2k 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 ...