pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS


find sparse files based on block size vs file size
Posted by Anonymous on Sat 11th Jan 2025 14:02
raw | new post

  1. # find sparse files based on block size vs file size
  2. ksh93 -c 'integer x ; find . -type f | while read fn ; do (( x=$(stat --printf "(%b * %B) - %s\n" "$fn") )) ; (( x >= 0 )) && continue ; printf "filename=%q, size/block diff=%d\n" "$fn" x ; done'

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at