Last active
March 10, 2023 06:29
-
-
Save weaponsforge/b81846a9f77bda3405b4ce824244814c to your computer and use it in GitHub Desktop.
Compact/compress the size of an Ubuntu VDI file on VirtualBox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compact/compress the size of an Ubuntu VDI file on VirtualBox (v7.0) | |
# Run this script in the Ubuntu VM running in VirtualBox | |
# Shut down the VM after then run "compact.bat" on the Windows host | |
df -h | |
echo "Nullifying free space..." | |
sudo dd if=/dev/zero of=/var/tmp/bigemptyfile bs=4096k status=progress ; sudo rm -f /var/tmp/bigemptyfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
compact.bat is available here.