Q: Linux dd command: save file instead of upload file to server I have this command run on Finnix OS:
dd if=/dev/sda | pv | gzip -9 | ssh root@LinodeIP "gzip -d | dd of=/dev/sda"

I got it from this artical: https://github.com/ClickSimply/docs/blob/windows-on-linode/docs/tools-reference/windows-on-linode/installing-windows-on-linode-vps.md
And I understand that this command will compress a file using gzip, then upload it to a server and run gzip command in that server to extract it. My question is what is the right command to save the gzip file in local computer instead of sending it to a server?
Thank you so much.

A: dd if=/dev/sda | gzip -9 > /path/to/output/file.gz
should do it. 
if you would still like to see the progress with pv then 
dd if=/dev/sda | pv | gzip -9 > /path/to/output/file.gz
should be the way to go
EDIT: worth to note, cat is the best way in my opnion to do this nowadays, as it uses the full potential of the hardware. dd was OK where you were limited by the drive speed, (like tapes, still being used for backups nowadays in some places and dd is fine there)
