holes

find runs of zero bytes

Install

All systems
curl cmd.cat/holes.sh
Debian Debian
apt-get install holes
Ubuntu
apt-get install holes
image/svg+xml Kali Linux
apt-get install holes
Windows (WSL2)
sudo apt-get update sudo apt-get install holes

holes

find runs of zero bytes

holes looks for runs of zero bytes (a.k.a. holes) in the specified input files (or the standard input), and prints the start addresses (in hexadecimal) as well as the lengths (in decimal). When multiple input files are specified, holes prefixes each line with the file name. It can be used with fallocate(1), truncate(1), or virt-sparsify(1).