wc -c has 32 bit counter
I'm trying to count 5 Gbyte bytes, and the counter is reset at 4Gbyte (32 bits)
podman run -it alpine /bin/sh
/ # dd if=/dev/zero bs=1M count=5000 | wc -c
5000+0 records in
5000+0 records out
**947912704**
/ # busybox
BusyBox v1.31.1 () multi-call binary.
It's not exactly a problem with busybox, because on Fedora 31 busybox counts correctly:
dd if=/dev/zero bs=1M count=5000 | busybox wc -c
5000+0 records in
5000+0 records out
5242880000 bytes (5.2 GB, 4.9 GiB) copied, 23.6317 s, 222 MB/s
**5242880000**
[andrii@localhost ~]$ cat /etc/os-release
NAME=Fedora
VERSION="31 (Workstation Edition)"
busybox
BusyBox v1.30.1 (2019-05-13 12:12:51 UTC) multi-call binary.
The busybox versions are a little different though, so maybe it is still a problem with busybox, but also could be a problem with the way it is built for the Alpine Linux