When I copy a hard drive I often use the dd command
I have one question about monitoring.
To see the progress of the copy I do like this
sudo dd if=$source of=$pathToUsb bs=4M conv=fdatasync status=progress
and I get the following message:
2969567232 octets (3,0 GB, 2,8 GiB) copiés, 22 s, 134 MB/s
if i want to retrieve only the number of bytes how can i proceed ?
sudo dd if=$source of=$pathToUsb bs=4M conv=fdatasync status=progress > capture.txt 2>&1
I also tried this
sudo dd if=$source of=$usb bs=4M conv=fdatasync 2>&1 | awk 'END {print ($0+0)}'
But it doesn't work
Any ideas ?