Here’s how to display history without the line numbers.
history -w /dev/stdout |
Result
cd /etc/httpd/conf view httpd.conf vim wiki.conf vim ssl.conf |
cloud engineer
Here’s how to display history without the line numbers.
history -w /dev/stdout |
history -w /dev/stdout
Result
cd /etc/httpd/conf view httpd.conf vim wiki.conf vim ssl.conf |
cd /etc/httpd/conf view httpd.conf vim wiki.conf vim ssl.conf
Check if package is on the system.
rpm -q httpd httpd-2.4.6-97.el7.centos.x86_64 |
rpm -q httpd httpd-2.4.6-97.el7.centos.x86_64
Check the history logs.
yum history list Loaded plugins: fastestmirror ID | Login user | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 115 | System <unset> | 2021-02-01 03:40 | Update | 1 114 | System <unset> | 2021-02-01 02:03 | I, U | 10 113 | System <unset> | 2021-01-29 19:54 | Update | 1 112 | System <unset> | 2021-01-21 14:41 | Update | 1 |
yum history list Loaded plugins: fastestmirror ID | Login user | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 115 | System <unset> | 2021-02-01 03:40 | Update | 1 114 | System <unset> | 2021-02-01 02:03 | I, U | 10 113 | System <unset> | 2021-01-29 19:54 | Update | 1 112 | System <unset> | 2021-01-21 14:41 | Update | 1
Check detail transaction id.
yum history info 114 | grep python Updated python-perf-3.10.0-1160.6.1.el7.x86_64 @updates Updated python-sss-1.16.5-10.el7_9.5.x86_64 @your-repo Updated python-sssdconfig-1.16.5-10.el7_9.5.noarch @your-repo |
yum history info 114 | grep python Updated python-perf-3.10.0-1160.6.1.el7.x86_64 @updates Updated python-sss-1.16.5-10.el7_9.5.x86_64 @your-repo Updated python-sssdconfig-1.16.5-10.el7_9.5.noarch @your-repo
It looks like python was updated in transaction id #114.
How to find out if a Windows Server was last patched.
From Powershell, run this command.
get-hotfix |
get-hotfix
From the command line, run this command.
C:\> systeminfo.exe |
C:\> systeminfo.exe
Or from the menu, follow these steps.
Open the Windows Settings UI. Click on Update & security. Click on the "Update history" link located under the Windows Update tab. |
Open the Windows Settings UI. Click on Update & security. Click on the "Update history" link located under the Windows Update tab.
If you need to see Bash history with timestamps, use this command.
HISTTIMEFORMAT="%d/%m/%y %T " |
HISTTIMEFORMAT="%d/%m/%y %T "
To make it permanent, add it to your .bashrc.
echo 'HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bashrc source ~/.bashrc |
echo 'HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bashrc source ~/.bashrc
Timestamps accuracy is retroactively, meaning it will not be accurate for commands performed prior to the history time format being set.