Thursday, May 23, 2024

Recover the deleted files in Linux

 Reference: https://forums.unraid.net/topic/101686-xfs_undelete-seems-to-be-a-better-way-to-recover-files/


mkdir xfs_undelete

cd xfs_undelete/

wget https://github.com/ianka/xfs_undelete/archive/refs/tags/v12.0.zip -O temp.zip

dnf install tcl

dnf install tcllib


xfs_undelete -t 2024-05-14 -o /root/recover /dev/mapper/ol-root

Wednesday, May 22, 2024

Settings for Live SASS Compiler in Visual Studio

 Add below block into file>preference>settings>user Settings


Settings

"liveSassCompile.settings.formats": [
{
"format": "expanded",
"extensionName": ".css",
"savePath": "/css/apps"
}
],
"liveSassCompile.settings.generateMap": true,
"liveSassCompile.settings.includeItems": [
"/scss/apps/**/*.scss"
],

Friday, May 10, 2024

Increase Space in CentOS 9 with lvm

yum install cloud-utils-growpart -y

 Grow the partition

# growpart /dev/sda 2

Extend lv

#  lvextend -l +100%FREE /dev/ol/root

Grow File System

# xfs_growfs /dev/ol/root

Wednesday, March 20, 2024

Jenkins: Disable all jobs in all folders

 https://github.com/jenkinsci/jenkins-scripts/blob/master/scriptler/disableAllJobsInAllFolders.groovy

Friday, January 12, 2024

Reduce /home and Add SWAP space in Centos 9

dnf install xfsdump
dnf install xfsrestore

 umount /home

xfsdump -f home.bkup /dev/mapper/ol-home

lvchange -an /dev/ol/home

 lvremove /dev/ol/home

 lvcreate -L 30G -n home ol

mkfs.xfs /dev/ol/home

 mount -a

 df -h


 xfsrestore -f home.bkup /home

ls /home

   df -h

 lvcreate -L 4G -n swap ol

  mkswap /dev/ol/swap

  swapon /dev/ol/swap

  echo "/dev/ol/swap swap swap defaults 0 0" >> /etc/fstab

free