Delete command history with last command

this command will remove commands history  with itself in an given offset as well

for h in $(seq 1968 1975); do history -d 1968; done; history -d $(history 1 | awk '{print $1}')

Connect to android device screen from ubuntu pc

Scrcpy is a software to connect to your android device (phone or tablet) from your ubuntu pc.

It is really fast and stable.All you have to do is install the software with using apt

$ sudo apt install scrcpy

and then connect your android device to your pc via usb cable.Enable adb usb debugging.and run the tool

$ scrcpy
INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 file pushed. 7.9 MB/s (24773 bytes in 0.003s)
INFO: Initial texture: 1080x1920

and Thumbs up! they really made a good software.I appreciate.Thanks to Genymobile!

Github page https://github.com/Genymobile/scrcpy

Extending / resizing lvm disk to free space

When you use lvm and still have free space on a virtual or physical disk,you can extend your lvm partition to use all free space.

Firstly you should be sure it exists.

Type “vgdisplay” command in root shell.You should see some free space in “Free  PE Size”

After that you should type this command “lvextend -l +100%FREE /dev/volgroup/logvol

After it finishes type resize command according to your file system.

For XFS : xfs_growfs /dev/centos/logvol

For EXT4: resize2fs /dev/centos/logvol

Attention : “logvol” word represents your logical volume.You can see its name in vgdisplay command output.