base-image/scripts/truncate_empty_space.sh
2022-12-15 20:45:20 -06:00

10 lines
180 B
Bash
Executable File

#!/usr/bin/env bash
set -eux
while read mountp; do
cat /dev/zero | dd of=${mountp}/EMPTY || true
rm -f ${mountp}/EMPTY
done < <(mount -l -t ext4 | awk '{print $3}')
sync