Questions tagged [history]
The history command can be used to retrieve commands you have previously typed in a shell.
191
questions
0
votes
2
answers
28
views
Is there a way to retrieve my previous commands on Ubuntu?
I was doing an assignment on Ubuntu that requires screenshots of my commands. But my laptop shut down and the program closed without me taking the screenshots. Is there a way to retrieve my previous ...
0
votes
1
answer
14
views
Find the version of a program using the hash
how could i verify that the man is up to date for a command with the hash?
md5sum pwd
md5sum $(whereis history | awk '{print $2}'))
man history presents:
"The GNU History Library is Copyright (C) ...
0
votes
2
answers
58
views
show previews command on terminal? [closed]
Like in Windows, where if you press "up_arrow" you can see the last used command and the history of commands used before that (in the current season)
Is there anything like that in ubuntu? I ...
0
votes
0
answers
27
views
How to record specific command history in Ubuntu
Is that possible to record the specific command in the customized history log file?
For example, I would like to record all ansible-playbook execute history to the customized log file immediately when ...
2
votes
0
answers
24
views
When using the history command , is it possible to get more details such as timestamp of each result? [duplicate]
History command options to see more details such as timestamp of each command entered
1
vote
2
answers
62
views
Creating individual bash scripts from Linux History
I want to be able to output my Linux bash history to a file. Then line by line create a new shell script with the content of the of each line.
I have tried this so far from the command line..
for ...
0
votes
0
answers
132
views
Viewing http requests that happened
Is there a log file where ubuntu stores all the http requests that come in?
I need to view a request that happened yesterday, more specifically the body of that POST request.
And also if nothing is ...
0
votes
0
answers
143
views
How to merge history from multiple terminal session
Is there a way to merge history from multiple terminal sessions in Fish shell?
I tried to use the command history merge but I get the following error"
history: you cannot use any options with ...
1
vote
0
answers
31
views
Reviewing history of inputs and outputs
I closed my previous session on Ubuntu and when I logged back in, I realized I wanted a screenshot of my previous outputs. I used history and that only gave me my last 50 previous inputs. Is there any ...
0
votes
1
answer
50
views
History and autocompletion do not work in SSH PAM session (openssh-server, libpam-ldap and nscd)
I configured a Linux Ubuntu 20.04 LTS VM, to authenticate users in the LDAP base and it worked correctly, however, when trying to repeat commands already executed, as we normally do in Linux, pressing ...
0
votes
1
answer
51
views
Help! My bash script stopped working as intended!
I am trying to get a very basic bash script to work but the output for the history command stopped working properly!!
This is the output
#!/bin/bash -i
history
And that's the code
Any ...
-2
votes
1
answer
97
views
I believe I was hacked over night [closed]
I believe I was hacked last night. I am a little bit new to the Linux world so I don't know if this is normal or not, but there were a lot of random things in my command line history. Here a Google ...
9
votes
5
answers
2k
views
How can I recall a command from history by number without executing it?
How can I grab a command from history by number to my command line without executing it?
This immediately executes command number 555 which I'm not looking for:
$ history 10
$ !555
This opens the ...
0
votes
2
answers
116
views
How to save terminal commands differently?
I am taking some online courses. I want to seperate all commands. That is, I want to save all commands that I execute during classes on a different memory file than my other system commands. This will ...
0
votes
1
answer
70
views
How do I execute command from history without printing it again in the terminal?
$ echo hello; cd ~/Docs
hello
$ !!
echo hello; cd ~/Docs
hello
I want to get hello and execute the change directory after typing !! without re-showing echo hello; cd ~/Docs, again.
Edit:
fc ...
0
votes
1
answer
87
views
ksh history problem
I'm on Xubuntu 20.04.02
This is a question about ksh command history. Something had changed recently and I'm looking for a way to restore the old behavior.
For years and up to about a month or so ago,...
1
vote
1
answer
2k
views
How display over 1000 commands history?
I am working on a project that have reached over more than 3000 commands. However most of the commands of mine is repeated and generated automatically due to my program.
I have try to grep or export ...
0
votes
0
answers
58
views
Find the history of all commands entered in a specific location in terminal
Is there a way that I could find history of all commands (or 100 most recent commands) that were entered in a specific directory?
For example, imagine I am in mona@goku:~/research/code/phosa/external/...
0
votes
2
answers
1k
views
Ubuntu 20.04 zfs grub rollback snapshots
I'm interested in teh ZFS snapshot feature, So I deployed 20.04 VM with ZFS.
I created a snapshot to test how the rollback procedure works.
sudo snapshot -r rpool@SNAP1
When then I created and ...
0
votes
1
answer
139
views
Accessing, from inside a script, the exact command that was issued on terminal to fire the script in question [closed]
Let's say I issue the following command:
./myscript.sh file* test.txt
Now, I wish myscript.sh to be able to create a variable, say howiwasran, such that if it were to echo ${howiwasran}, the output ...
0
votes
1
answer
393
views
use the terminal without making history
I use a shared Ubuntu computer at the local Makerspace. looking at history I can see some times where I sshd into a remote host... I kinda wish I hadn't done that from here. I am able to run history -...
0
votes
0
answers
477
views
command history
Which is the most correct answer for this question: Write a one-line command that searches the last 50 commands that have been used for the term "find", and saves the result in history.txt
...
34
votes
5
answers
40k
views
Is there a default clipboard history in Ubuntu? If there is, how can I access it?
Is there a default clipboard history in Ubuntu 20.04 or later? If there is, how can I access it? I know there are lots of available applications for saving clipboard history in the default Ubuntu ...
1
vote
1
answer
151
views
How to show recent programmes?
how to display the recently used programmes (not files, that is implemented)?
I am looking for:
a function / script or so to do the job.
How I would like to have the problem solved is something on ...
5
votes
2
answers
674
views
reverse-i-search of history not finding expected commands
Today upon bringing up a bash terminal I tried finding a frequently-used command from my bash history via Ctrl-r. To my surprise, it wasn't found. Upon inspecting ~/.bash_history, I saw instances of ...
0
votes
0
answers
38
views
Prevent showing duplicated entries in terminal
Is there any way to prevent showing duplicated entries in terminal?
Every time I go up, I see lots of repeated command until I find the command I want
In windows 10 version 2004 they fix this issue, ...
1
vote
1
answer
90
views
How to clear previous data in terminal? [closed]
I’m sure this question has been asked a million and one times already. I saw a video the other day about accessing all lost passwords and usernames through terminal nnd my question is are you able to ...
0
votes
0
answers
39
views
Write bash history when connection is terminated abnormally [duplicate]
How can I make sure that my bash history gets written to ~/.bash_history when I am disconnected abnormally?
I work on several remote Linux hosts, and my connection is frequently terminated abnormally....
1
vote
1
answer
1k
views
Logging all terminal input/output history
Ubuntu 20.04 on Hyper-V VM
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 ...
1
vote
2
answers
276
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
2
answers
270
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
0
answers
1k
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
0
answers
35
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
0
answers
153
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
0
answers
271
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 ...
3
votes
0
answers
398
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 ...
8
votes
2
answers
3k
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
2
answers
11k
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
1
answer
456
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
0
answers
218
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
2
answers
1k
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 ...
11
votes
1
answer
2k
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 built-in history command report them correctly (until I'm still logged-in in bash).
But ...
1
vote
2
answers
1k
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
1
answer
56
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
1
answer
667
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 ...
1
vote
0
answers
56
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 ...
6
votes
1
answer
4k
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
1
answer
208
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
2
answers
618
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
1
answer
1k
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 ...