If the history file is ~/desktop/unity/runner/history
, you may consider link it to /dev/null
.
that is, in a terminal
$ cd ~
$ rm ~/desktop/unity/runner/history
$ ln -s /dev/null ~/desktop/unity/runner/history
then logout and login again.
History command showing the directory: NO! :(
History command showing the date: YES! :)
That's because (from man history
):
The history list is an array of history entries. A history entry is
declared as follows:
typedef void * histdata_t;
typedef struct _hist_entry {
char *line;
char *timestamp;
histdata_t data;
} HIST_ENTRY;
So, nothing about the directory where the command has been typed.
To know the exact time certain command was executed, see help history
:
If the $HISTTIMEFORMAT variable is set and not null, its value is used
as a format string for strftime(3) to print the time stamp associated
with each displayed history entry. No time stamps are printed
otherwise.
So all you have to do is to set $HISTTIMEFORMAT
something like this in the current shell:
export HISTTIMEFORMAT="%F %T "
To have it permanently set, run the following command:
echo 'export HISTTIMEFORMAT="%F %T "' >> ~/.bashrc
The above command will add a new line (export HISTTIMEFORMAT="%F %T "
) at the end of your ~/.bashrc
file.
Now, the output of history
will look something like this:
...
1613 2013-11-13 13:00:15 cat .bash_history
1614 2013-11-13 13:01:04 man history
1615 2013-11-13 13:11:58 help history
1616 2013-11-13 13:19:07 ls
1617 2013-11-13 13:19:09 cd
1618 2013-11-13 13:19:15 history
Best Answer
You can clear Alt+F2 history in dconf editor.
Install dconf editor:
Hit Alt+Ctrl+T and run the following command:
sudo apt-get install dconf-tools
Or search for "dconf-tools" in Software Center and install it from there.
Clearing History:
Once installed, Hit super key (windows key) to open Unity dash and search for "dconf editor" and open it.
Navigate to
Desktop > Unity > runner
and click on "Set to default" in lower right corner. That's it!