Talk:Sparse file

From ArchWiki
Latest comment: 12 January by Agowa338 in topic Add section about truncation behaviour of dd

Sparse disk images on HFS+

You can create sparse disk images on HFS+ systems. So I'm confused about what the difference is? --Margali 23:00, 23 March 2012 (EDT)

https://en.wikipedia.org/wiki/Sparse_file are not to be confused with https://en.wikipedia.org/wiki/Sparse_image. https://en.wikipedia.org/wiki/HFS_Plus explicitly states sparse files can not be created. Also note https://en.wikipedia.org/wiki/Disk_image are not to be confused with https://en.wikipedia.org/wiki/Sparse_image. Regid (talk) 06:46, 10 March 2020 (UTC)Reply[reply]
That's still not a technical explanation why Apple's sparse disk images support any file system. -- Lahwaacz (talk) 15:59, 10 March 2020 (UTC)Reply[reply]

Add section about shrinking sparse files

add a section explaining how to shrink a sparse file to remove all the null bytes at the start or end without also removing data like "truncate" would do. —This unsigned comment is by Agowa338 (talk) 15:29, 12 January 2024 (UTC). Please sign your posts with ~~~~!Reply[reply]

Add section about truncation behaviour of dd

As this page is also mentioning images it probably should also be mentioned how dd behaves with sparse files esp. in regards to truncation. In case of a `dd if=header.img of=disk.img` it would cause the disk.img to be truncatted to the size of header.img as long as it was sparse and `conv=notrunc` was not specified. However just doing a `dd if=disk.img of=copy-of-disk.img` wouldn't cause a truncattion. Similar also using dd to copy a file with nullbytes at the end into a smaller one would also not cause a truncattion. Basically the default of dd is to truncattes the destination file only if it was larger than the input file. Also one may now think that also a `conv=trunc` exists, but this isn't the case.

—This unsigned comment is by Agowa338 (talk) 15:29, 12 January 2024 (UTC). Please sign your posts with ~~~~!Reply[reply]