Skip to content

Instantly share code, notes, and snippets.

View mbinette's full-sized avatar

Michael Binette mbinette

  • Oncasoft LLC
  • New Hampshire
View GitHub Profile
@kuznero
kuznero / vdi-file-compacting.md
Last active August 10, 2024 23:23
How to compact VirtualBox's VDI file size?

Source: StackOverflow

1. Run defrag in the guest (Windows only)

2. Nullify free space:

With a Linux Guest run this:

sudo dd if=/dev/zero | pv | sudo dd of=/bigemptyfile bs=4096k
sudo rm -rf /bigemptyfile
#!/bin/bash
# The binary is most likely to have the current directory name
PROCESS=${PWD##*/}
# We kill the previous process
killall ${PROCESS}
# We launch the process
go build