is there a command on Linux to remove a file but zeroing it's contents first?so if i do, something like this:rm -rf /var/cache/pacman/pkg/*it would overwrite each file on that directory with 0 values, then erase iti need it for compacting my VMware image files without creating super big file containing zeros first.
How can I zero files out inside a VMware image file so that their space can be reclaimed?
filesystems;vmware;virtualization;disk
The shred command can zero out a file. To do what you want, I think something like this should workfind /var/cache/pacman/pkg -type f -exec shred -n 0 -z {} \; \    && rm -rf /var/cache/pacman/pkg/*