Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Archives for history

February 1, 2021

Checking Yum Transaction Logs

Check if package is on 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             @cah-cloud-centos7-updates
    Updated python-sssdconfig-1.16.5-10.el7_9.5.noarch      @cah-cloud-centos7-updates

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 @cah-cloud-centos7-updates Updated python-sssdconfig-1.16.5-10.el7_9.5.noarch @cah-cloud-centos7-updates

It looks like python was updated in transaction id #114.

December 10, 2019

Get-Hotfix

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.

October 31, 2019

Bash History With Timestamps

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.

  • Cloud
  • Linux
  • Git

Copyright © 2012–2021