Monthly Archives: June 2016

Reduce KVM Windows qcow2 file size

Clean up the virtual drive (remove temps files, etc) Defrag with the open source UltraDefrag software with “full optimisation” Run “sdelete -z c:“ Run “qemu-img convert -p -f qcow2 -O qcow2 Win7.qcow2  /newpath/Win7.qcow2“ For Linux Guest: dd if=/dev/zero of=/mytempfile # … Continue reading

Posted in Linux, Windows | Tagged | Leave a comment

Bash Assign Find Output To Array

To assign the output to an array, you need to use a command substitution inside of an array assignment. arr=($(grep -n “search term” file.txt | sed ‘s/:.*//’)) The inner $() runs the command while the outer () causes the output … Continue reading

Posted in Linux | Tagged , | Leave a comment