Skip to content

Instantly share code, notes, and snippets.

@tknr
Last active January 25, 2022 09:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tknr/da74e12f77ab01df89b8fcd6afc689f8 to your computer and use it in GitHub Desktop.
Save tknr/da74e12f77ab01df89b8fcd6afc689f8 to your computer and use it in GitHub Desktop.
do compact all virtualbox hdds
#/bin/bash
## https://www.ringosan.net/?p=258
export IFS=$'\n'
for uuid in `vboxmanage list hdds | grep ^UUID | sed 's/ //g'| cut -d ':' -f 2`
do
echo ${uuid}
vboxmanage modifyhd ${uuid} --compact
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment