Questions tagged [history]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

Logging all terminal input/output history

I am trying to do something similar to what is written in this answer. I think this answer logs all the terminal to a certain file. I would like to be able to log all my terminal input/output by day ...
1
vote
2answers
62 views

How to obtain a consolidated system wide history irrespective of users or powers? [duplicate]

If I am a normal user and I type history I get a set of commands typed by me in the terminal. Now I make myself the sudo su (su stands for super-user here and not substitute user) sudo su I am ...
1
vote
2answers
54 views

History -a from a bash script

I'm trying to call the following within a bash script: `history -a current_history` it is supposed to create the file with the commands executed this session. Works perfectly fine in a shell ...
2
votes
0answers
157 views

Why does Ubuntu 20.04 on ZFS destroy custom datasets at boot-time zpool import of the zpool.cache?

After creating the targets of a personal data lake, and filling them with plenty of terabytes through rsync, I was quite surprised at the next reboot, that Ubuntu's ZFS didn't like the datasets, and ...
1
vote
0answers
16 views

How to view users' history commands from different ssh clients

As admin, I need to check history commands of users. However, I found that logged from different ssh clients, you can't see all history in the host but only history from same ssh client machine. So is ...
0
votes
0answers
41 views

How to see history of suspensions?

There are commands to check uptime, history of reboots, but how to check time(s) when system was suspended? Kubuntu 18.04.4 Desktop.
0
votes
0answers
43 views

append bash history before command finishes

With the solution in [1] it is possible to write the command to bash_history, after the command has finished, with multiple terminals. That means, if the command is issued and if something happens ...
0
votes
0answers
21 views

Is it possible to view full shell log? [duplicate]

Is it possible to view the outputs history of previous commands and not only shell commands history? If so how? Thanks in advance!
1
vote
0answers
32 views

History timestemp shows wrong dates

when running the commands HISTTIMEFORMAT="%d/%m/%y %T " history the date output are wrong. For example the sudo reboot in line 1407 was done on 31/12/2019. I am not sure about the hours. How can I ...
0
votes
0answers
28 views

Make Ctrl-p and Ctrl-n search the shell history filtered by typed characters

I love that emacs key bindings also work in the ubuntu shell by fefault. However, I would also like to have those two keys partially search through the shell history but filtered based on what was ...
8
votes
2answers
974 views

How to see time in ~/.bash_history file

I added time to the ~/.bashrc file, so now it shows me time when I execute history command like this: 376 04/10/19 20:39:52 sudo cat ~/.bash_history 377 04/10/19 20:40:04 date 378 07/10/19 ...
1
vote
2answers
1k views

clear terminal cache [duplicate]

I need to clear the terminal cache, I have tried with history -c but it clears the cache in that terminal session, but if I open another session and type history it shows all the previous commands.
0
votes
1answer
51 views

List unique result only on history command

I ran this command history | cut -c 8- It listed all the history commands as expected without line numbers. I'm wondering if there is a way to list only unique one. I've tried history | cut -...
0
votes
0answers
54 views

Changing ubuntu 18 History size

Im trying to change ( Globally) the HISTSIZE & HISTFILESIZE I've tried to add the values into /etc/bash.bashrc and its not working. Any suggestions?
1
vote
2answers
339 views

Shortcut to open xfce4-terminal and run 'history' command on Xubuntu 16.04.6

I'm trying to set a keyboard shortcut to open xfce4-terminal and run history(command) and keeping terminal open, but so far no avail, I read some tutorials then I tried xfce4-terminal -e "/bin/bash -c ...
9
votes
1answer
632 views

multiline command chunks in bash history into multiple lines

In Bash (as well as Bash in WSL), multiline written commands can call-back with up/down arrows correctly also builtin history command report them correctly (until I'm still logged-in in bash). But ...
1
vote
2answers
332 views

bash: error in export command that bash: !st: event not found

When i tried to excute the following export SENTRY_SECRET_KEY="k(#!st-6eb2y74=@^6s7a67fy5a&@p3y=57#aszb@hs)n^vv0#" I get the error "bash: !st: event not found" Please give me solution..
0
votes
1answer
45 views

commands history

So, I wanted to see all the history of commands of a certain user, me more specifically, the probem is that I want to do soo in a NFS server that I am connected through ssh, so, everytime I disconect ...
2
votes
1answer
116 views

Save all command and all output (using script across terminals)

For a short period of time, I want to save the command history and output of every command I run in any terminal I open. It should all go in the same file. So basically I want to run a command (or ...
0
votes
0answers
50 views

up and down arrow key doesn't working in ubuntu 1804

i've installed ubuntu 1804 i wanna choose the privious command to run of course i can using 'history' command to check but using up/down key to choose is more convinient, like in other OS
6
votes
3answers
1k views

How to clear history in Gedit? (Ubuntu 18.04)

I was just wondering how to clear the recently opened documents history on Gedit? I've looked but can't find anything on it. Thanks in Advanced!
1
vote
0answers
48 views

Terminal/Shell config Question

Ubuntu 18.04.1 LTS TERM=wyse60 SHELL=/bin/bash set -o vi telnet using TinyTerm v4.20.1306 with wyse60 emulation My question is: Is there something I can add to .bash_profile to allow .bash_history ...
5
votes
1answer
1k views

Command history seems to be missing the first 75 lines

A couple of years ago, I did the automatic distribution update from 14.04 to 16.04. For the first time in my life, I was able to continue to use the computer after the automatic distribution update. ...
1
vote
1answer
94 views

Bionic Beaver Nautilus list of visited servers

Newly switched from 16.04 LTS to Bionic Beaver. Yet in 16.04 several smb servers were stored to Nautilus server history (or so, sorry don't know the exact terminology). Now after upgrade to B. Beaver ...
0
votes
2answers
149 views

Cleaning up the whole trace of one's activity on ubuntu

I am working on an ubuntu 16.04 LTS, The computer I am working on is temporarily in my possession, given to me by my employer. So at some point I have to give it back. What exactly should I consider ...
2
votes
1answer
807 views

Ubuntu 16.04 experienced an internal error

My Ubuntu was stuck in a login loophole hence I removed lightdm and installed gdm instead. Somewhere in the instructions someone suggested to add a sleep 1 in a file. After I did so the system has ...
2
votes
1answer
56 views

Erase Recent Folder in Nautilus via Terminal Command

Can I empty out Recent folder in Nautilus by typing terminal command, and if yes, do I have to re-log in to my system to see the effect?
0
votes
1answer
447 views

How can I audit commands executed by a user without installing acct

I want to audit commands executed for two accounts on my ubuntu desktop about a year ago. I know of acct [sudo apt-get install acct] where I can run lastcomm, dump-acct, dump-utmp but I want a ...
1
vote
2answers
115 views

Cannot connect to the internet after cleaning history

I was using a friend's laptop with an Ubuntu 16 OS. I was asked to clean the historic files an after browsing a few websites, I used: cat /dev/null > ~/.bash_history command which appear not ...
1
vote
1answer
90 views

Usermod and history output

I used usermod -G without the -a option, now the main user has only 2 groups. I want to restore all the previous groups but the problem is that i need to list all the groups before the changes I am ...
10
votes
1answer
779 views

Is there any way to check history only of current session?

I wanted to know if there is any command or any other way I can check my command history only in the current session.
2
votes
0answers
468 views

How to delete bash history for specific date range [duplicate]

I know how to delete the complete history of all the commands I have ran in my bash terminal, however, I don't want to delete all the history. What I want is to delete the history for a specific ...
1
vote
0answers
101 views

Wanted to disable history -c for all users except the one with sudo rights?

I am able to secure .bash_history and .profile files so that user cannot delete or edit those files and cannot change shell as well. I needed this for bastion host for all production instances. I ...
12
votes
1answer
410 views

Terminal replacing ! followed by a number with a command

I'm very confused about my ubuntu terminal session, it seems to replace sections in commands that start by ! followed by a number with seemingly random commands. It does that with !87 replacing it ...
1
vote
1answer
4k views

How can I clear screen command history? [duplicate]

I'm using screen command after ssh to a public remote machine with Ubuntu 14.04 so that I could continue my sessions whenever I want. I've found that some admins are tracking my command history and ...
0
votes
2answers
354 views

How to store the output of `pwd` along with regular commands in history? [duplicate]

I want to know how I can include the current working directory (output of pwd) to the commands stored in .bash_history file. I want this because sometimes same command is executed from different ...
-1
votes
2answers
245 views

Add to History Script not working

I am trying to add lines from a file to my history, but it just adds the program code! What am I doing wrong? #!/bin/bash HISTFILE=~/.bash_history set -o history cat file.txt | while read line do ...
4
votes
1answer
1k views

Can I get the commands from history executed in bash in the last 15 mins?

I want to put in place a cron job that sends me notification about a particular command executed in the last 15 mins. I can get the history along with timestamp using export HISTTIMEFORMAT='%F %T', ...
16
votes
1answer
5k views

How can I view history in terminal for specific date?

How can I view the terminal history for a specific date? For example today is 4-apr and I want to view the history of 31-mar
3
votes
2answers
443 views

!x not found - bash script

I made a simple bash script to run a range of commands in your history, but it's not working. read -p "control + c to cancel" for i in $(seq $1 $2) ...
12
votes
3answers
34k views

Finding an old command in the shell history [duplicate]

How can I find an old command I ran in my terminal? I used an appengine command and wish to just find it in my local command history without researching it online again.
0
votes
0answers
240 views

Terminal can't scroll after overnight idle computing

I'm on Ubuntu 16.04, using ubuntu terminal, running zsh with oh-my-zsh. I'm on a ssh session to a remote computer with the same configuration. I launched a big computing and forgot to output the ...
0
votes
1answer
157 views

How to clear search history in 'Artha'?

Artha is a dictionary application for Ubuntu. I want to know that is there a way to delete the search history from it?
1
vote
1answer
73 views

Upon restart my ubuntu commands history number changed

While restarting my ubuntu 16.04 OS, my terminal commands history numbers is changed, only the history numbers is changed my history is saving perfectly. History numbers always display numbers between ...
0
votes
2answers
3k views

Laptop web camera “active” history

Is there a way to see the history of when my web camera has been active? For example during the previous day?
7
votes
5answers
1k views

Searchable Clipboard Manager, like ctrl-r in bash

I am looking for a clipboard manager with search functionality. I love CtrlR in the bash shell and would like to have the same functionality like that in clipboard manager for my desktop. Up to now I ...
4
votes
1answer
60 views

Thunderbird: History of seen Messages

Is there a way in thunderbird to step backward and forward in the history of last messages? Like in firefox: It has a history of the last visited pages. I would like to have a history of the last ...
1
vote
3answers
795 views

View terminal history without the line number

How can I get the Ubuntu terminal history without the line number? history history command returns the previous commands with line number. I am looking for something like: cd tizen-sdk\tools ...
6
votes
1answer
4k views

What's the difference between “history -w” and the action of closing a shell session?

I did some tests about history: I ran history-c and then logged out. This cleared history for the current shell. I ran history -c && history -w. This deleted everything. I deleted the entire ...
7
votes
2answers
6k views

How to save terminal history to a file from a bash file?

I am trying to create a bash script that will save the terminal history to a file called hist.txt. Using history > hist.txt doesn't seem to work in the bash script, but works fine when executed in ...