Skip to content

Instantly share code, notes, and snippets.

@tueda
Created March 9, 2014 13:09
Show Gist options
  • Select an option

  • Save tueda/9447498 to your computer and use it in GitHub Desktop.

Select an option

Save tueda/9447498 to your computer and use it in GitHub Desktop.
#!/bin/sh
set -e
#sudo apt-get clean
kbytes=`df -P -k | grep /dev/sda1 | sed 's/ */ /g' | cut -d ' ' -f 4`
size=`expr $kbytes - 10`
file=tmp_zero$$
dd if=/dev/zero of=$file bs=1k count=$size
rm $file
@tueda

tueda commented Apr 26, 2014

Copy link
Copy Markdown
Author

On Windows:

VBoxManage.exe list hdds
VBoxManage.exe modifyhd <UUID> --compact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment