Thursday, November 22, 2018

github - get patch file from PR



So, you have a PR like this:
https://github.com/openshift/openshift-ansible/pull/10077


To get the corresponding patch, just add .patch to the PR number.

https://github.com/openshift/openshift-ansible/pull/10077.patch




https://owenou.com/ten-things-you-didnt-know-git-and-github-could-do


Wednesday, November 21, 2018

Get IP address of the VM from the host



Get IP address of the VM from the host

First:
# virsh net-list
< list of networks>


Next:
# virsh net-dhcp-leases   

Expiry Time          MAC address        Protocol  IP address                Hostname        Client ID or DUID
< get hostname and the corresponding IP address here  >



Monday, November 19, 2018

interesting challenges for fun :)


interesting challenges to try for 30 days :) :)

http://hackerella.com/30-day-challenge-ideas/






file command in linux


file command

file command can be used to determine filetype.

For example.

# file file.txt
file.txt: ASCII text

# file testfile.pdf

testfile.pdf PDF document, version 1.5


You can also check disk files.: ( you need root permission though)

file -s  /dev/sda1 

$ sudo file -s /dev/sda1
/dev/sda1: Linux rev 1.0 ext4 filesystem data, UUID=ABCD-ABCD-XYZ (needs journal recovery) (extents) (large files) (huge files)



 

systemctl list units




systemctl list-units

Show only the failed units:

systemctl list-units   --state=failed