Monthly Archives: October 2024

Cool Bash Commands

Remove the ABCD– prefix from a filename:$ s=’ABCD –11212239.pdf’$ mv “$s” “${s#ABCD–}” Remove the prefix from all files in current directory recursively:while IFS= read -r -d ” filename; do mv “$filename” “${filename#ABCD–}”done < <(find . -type f -name ‘ABCD–*’ -print0) … Continue reading

Posted in Linux | Comments Off on Cool Bash Commands

Resize a Volume Group in Linux

#Check size of Volume Groupdf -h -T | grep vg#Display volume group info. Check for free spacesudo vgdisplay#Display logical volume infosudo lvdisplay#Test runsudo lvextend -t -v -l +100%FREE /dev/ubuntu-vg/ubuntu-lv#Actual runsudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv#Resize logical volumesudo resize2fs /dev/ubuntu-vg/ubuntu-lv#Verifydf -h -T … Continue reading

Posted in Linux | Comments Off on Resize a Volume Group in Linux