On Fri, Jul 02, 2021 at 12:52:53PM +0200, Thomas Schmitt wrote:
> Hi,
> 
> Teemu Likonen wrote:
> > For this new subject I will add another use: quickly create empty file
> > of specific size, for example 5 * 1024 bytes:
> >    $ dd of=empty obs=1024 seek=5 count=0
> 
> Not to forget creation of sparse files with few disk consumption.

Nice.

And then, there's "oflag=sync". I hate it when the system says
"Done!" when writing to an USB stick, then I say "sync", and only
then the writing starts. For an unknown amount of time. Combine
with "status=progress" to taste :)

> For testing zisofs i have this in a script:
> 
>   #!/bin/bash
>   # 100gb with big holes
>   for i in {1..100}
>   do
>     echo $i | dd of=100gb bs=1 seek="$i"G 2>/dev/null
>   done
> 
> The resulting file "100gb" occupies 404 KB in an ext4 filesystem.
> (It shall not contain entirely zeros. So it is not the smallest possible
> 100 GiB file.)

nice, thanks.

Cheers
 - t

Attachment: signature.asc
Description: Digital signature

Reply via email to