Linux write zeros to empty space on common file systems: ========================================================= This allows you to fill empty space with zeros on a partition that still has data on it. Its good if you need to make a compressed image of the drive or want to have a somewhat safe way to wipe deleted data from the drive (SSD's might still have some remnant data shuffled around). How to (you do not need root/sudo): cat /dev/zero > zero.file sync rm zero.file Note: the sync command is a paranoia measure that ensures all data is written to disk - an intelligent cache manager might work out that it can cancel writes for any pending blocks when the file is unlinked. Source: https://superuser.com/questions/19326/how-to-wipe-free-disk-space-in-linux Date: July 23rd 2024.