Re: [semi-OT] C7 Possible bug but I can't determine what tool has the problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, Jan 15, 2020 at 11:38 AM Alessandro Baggi <
alessandro.baggi@xxxxxxxxx> wrote:

> Hi Jon,
> I wrote in the first mail the script with the current order of command
> that I used. Try to run in a bash script and you will see the result.
>
> If not my sequence is:
>
> dd if=/dev/zero of=src/testfile bs=1M count=100
> rsync -avS src/ dest/
> du -h dest/testfile
> du -b dest/testfile
>
> for urandom:
>
> dd if=/dev/urandom of=src/testfile bs=1M count=100
> rsync -avS src/ dest/
> du -h dest/testfile
> du -b dest/testfile
>
> without --sparse the same as first sequence without -S option.
>
> But why du reports 0M when with -b reports correct bytes and why this
> happens only with zeroed file?
>
>
Ah, I misunderstood what you meant. I had thought you might have created a
file with urandom first and then overwrote it with zeros. This is behaving
as expected with sparse files. You can create a sparse file with dd by
using seek:
https://www.thegeekdiary.com/how-to-create-sparse-files-in-linux-using-dd-command/
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux