Questions tagged [history]

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

Filter by
Sorted by
Tagged with
1 vote
2 answers
67 views

Check Ubuntu version history

How can I check which versions on Ubuntu were previously installed on a system that has had multiple upgrades? Like if it's on Ubuntu 22.04 now but has previously been on 18.04, 16.04, 14.04, 12.04, ...
b264's user avatar
  • 363
0 votes
1 answer
53 views

Is it possible to see what processes did last mounted USB device?

Is it possible to see what last mounted USB device? I am afraid, that last device infected my ubuntu machine and want to find out something about that device.
Karolis's user avatar
  • 29
0 votes
1 answer
74 views

History file was rewritten

I had more then 5K records in my history file on Ubuntu 22.04. But for 5 last months I used my computer only by ssh and now I found that .bash_history file was rewritten with only ssh sessions. And I ...
Untitled's user avatar
-3 votes
1 answer
112 views

No updates since mid-December?

I usually get screen messages at least once a week for available security updates (or other updates) and I apply them immediately. But I haven't seen one since mid-December, which seems odd. Is anyone ...
Ancient's user avatar
  • 19
1 vote
1 answer
127 views

"bash --noprofile --norc" destroys .bash_history

While I have HISTFILESIZE and HISTSIZE greater than 500, the bash history gets destroyed after I entered to a "norc" shell. How can I keep the history data through the various shell types? ...
丶 Limeー来夢 丶's user avatar
4 votes
1 answer
6k views

How to clear password history in Linux?

How do I clean the history of previous used passwords? The history which is used by passwd or whatever else? I see: t-account@dbg-host: ~ $ passwd Changing password for t-account. Current password: ...
Asc's user avatar
  • 69
0 votes
0 answers
161 views

nano and vim (search) history remove

How can I delete nano and vim history (typed text, search, etc.)? I don't want to disable it for the future, only erase the current values. THX
user1607778's user avatar
0 votes
2 answers
801 views

Ubuntu's history keeps popping up

I've got a problem with my Ubuntu 22.04. I want to clear out the command line history, so I type 'history -c' and everything seems fine, I type 'history' and it's all cleard. Then, I logout and ...
user1607778's user avatar
0 votes
2 answers
484 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 ...
Cemile02's user avatar
-1 votes
1 answer
63 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) ...
Ignacio del Corro's user avatar
0 votes
2 answers
557 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 ...
yonatan abergel's user avatar
2 votes
0 answers
29 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
Nicholas Robertson's user avatar
1 vote
2 answers
74 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 ...
james 's user avatar
  • 13
0 votes
0 answers
2k 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 ...
Denis 's user avatar
0 votes
0 answers
1k 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 ...
Oren's user avatar
  • 13
1 vote
0 answers
57 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 ...
Nikki Moreno's user avatar
0 votes
1 answer
212 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 ...
Marcos Santos's user avatar
0 votes
1 answer
144 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 ...
Christina .V's user avatar
-2 votes
1 answer
126 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 ...
Arion's user avatar
  • 1
8 votes
5 answers
4k 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 ...
Kevin Berry's user avatar
0 votes
2 answers
351 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 ...
Master_Nachi's user avatar
0 votes
1 answer
123 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 ...
Johny's user avatar
  • 71
0 votes
1 answer
191 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,...
Jeffery Small's user avatar
4 votes
1 answer
13k 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 ...
CoffeePlease's user avatar
0 votes
0 answers
86 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/...
Mona Jalal's user avatar
  • 4,545
0 votes
2 answers
2k 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 ...
Catalyph's user avatar
0 votes
1 answer
153 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 ...
Ujjwal Kumar's user avatar
0 votes
1 answer
2k 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 -...
j0h's user avatar
  • 14.8k
0 votes
0 answers
2k 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 ...
Riad B's user avatar
  • 1
88 votes
8 answers
143k 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 ...
Cherwen Molina's user avatar
1 vote
1 answer
419 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 ...
Rolfi's user avatar
  • 11
6 votes
2 answers
1k 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 ...
BipedalShark's user avatar
0 votes
0 answers
226 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, ...
Jeny's user avatar
  • 1
2 votes
1 answer
522 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 ...
Colesbrandbags's user avatar
0 votes
0 answers
48 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....
wdb's user avatar
  • 115
1 vote
1 answer
3k 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 ...
Adam Ch's user avatar
  • 173
1 vote
2 answers
901 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 ...
Praveen Kumar-M's user avatar
1 vote
3 answers
827 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 ...
throwaway56786897's user avatar
2 votes
0 answers
2k 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 ...
almereyda's user avatar
1 vote
0 answers
67 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 ...
Negrito's user avatar
  • 794
0 votes
0 answers
513 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.
R S's user avatar
  • 2,399
0 votes
0 answers
413 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 ...
kelmat's user avatar
  • 293
3 votes
0 answers
1k 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 ...
user1889297's user avatar
8 votes
2 answers
6k 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 ...
Prototype's user avatar
  • 129
1 vote
2 answers
24k 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.
Jaime Roman's user avatar
1 vote
1 answer
1k 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 -...
code-8's user avatar
  • 195
0 votes
0 answers
254 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?
ayali's user avatar
  • 1
1 vote
2 answers
2k 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 ...
vladimir pavloski's user avatar
14 votes
1 answer
3k 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 ...
αғsнιη's user avatar
  • 35.7k
1 vote
2 answers
2k 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..
Dhinakaran Kalaimani's user avatar