Wanted to trim trailing nulls from a biggish partition file. Didn't find a good ready made tool for it, so I made one. Uses grep to find the last non null character and then truncates the file after it.
Updated: The grep way wasn't really working. Now using CLI app I made ( TNT - Trailing Nulls Trimmer) instead. Also restores files as sparse...
---------------------------------------------------- Trailing Nulls Trimmer Bat by CXZa https://cxzstuff.blogspot.com/ ---------------------------------------------------- Usage: To trim, drop a file to be Trailing Nulls Trimmed over this batch file. To restore the nulls, run another batch file created. Tip: Put bat's shortcut into the SendTo-folder. Backup the file before using this if it's important! ---------------------------------------------------- Press any key to close this window . . .
Download: https://disk.yandex.com/d/AANoB70KnVgwnw---------------------------------------------------- Trailing Nulls Trimmer Bat by CXZa https://cxzstuff.blogspot.com/ ---------------------------------------------------- Target: a test file.img Size: 2147483648 bytes ---------------------------------------------------- Trimming... (this may take a while) [#############-------------] 50% 426.8 MB/s ETA 2.4s ET 2.4s Done! ---------------------------------------------------- New size: 1073741827 bytes a test file.img-RestoreNulls.bat created. ---------------------------------------------------- Press any key to close this window . . .