The Stack Overflow podcast is back! Listen to an interview with our new CEO.
4 No need for `-c` as the input file is not given as argument.
source | link

You don't need to use dd or piping at all.

</dev/sda gzip -c >/mnt/sdb1/backups/disk.img.gz
</mnt/sdb1/backups/disk.img.gz gzip -dcgunzip >/dev/sda

I once made a benchmark and found using dd slower than cat for a straight copy between different disks. I would expect the pipe to make any solution involving dd even slower in this case.

You don't need to use dd or piping at all.

</dev/sda gzip -c >/mnt/sdb1/backups/disk.img.gz
</mnt/sdb1/backups/disk.img.gz gzip -dc >/dev/sda

I once made a benchmark and found using dd slower than cat for a straight copy between different disks. I would expect the pipe to make any solution involving dd even slower in this case.

You don't need to use dd or piping at all.

</dev/sda gzip >/mnt/sdb1/backups/disk.img.gz
</mnt/sdb1/backups/disk.img.gz gunzip >/dev/sda

I once made a benchmark and found using dd slower than cat for a straight copy between different disks. I would expect the pipe to make any solution involving dd even slower in this case.

3 replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
source | link

You don't need to use dd or piping at all.

</dev/sda gzip -c >/mnt/sdb1/backups/disk.img.gz
</mnt/sdb1/backups/disk.img.gz gzip -dc >/dev/sda

I once made a benchmarkmade a benchmark and found using dd slower than cat for a straight copy between different disks. I would expect the pipe to make any solution involving dd even slower in this case.

You don't need to use dd or piping at all.

</dev/sda gzip -c >/mnt/sdb1/backups/disk.img.gz
</mnt/sdb1/backups/disk.img.gz gzip -dc >/dev/sda

I once made a benchmark and found using dd slower than cat for a straight copy between different disks. I would expect the pipe to make any solution involving dd even slower in this case.

You don't need to use dd or piping at all.

</dev/sda gzip -c >/mnt/sdb1/backups/disk.img.gz
</mnt/sdb1/backups/disk.img.gz gzip -dc >/dev/sda

I once made a benchmark and found using dd slower than cat for a straight copy between different disks. I would expect the pipe to make any solution involving dd even slower in this case.

2 fixed braino (thanks psusi)
source | link

You don't need to use redirectiondd or piping at all.

</dev/sda gzip -c >/mnt/sdb1/backups/disk.img.gz
</mnt/sdb1/backups/disk.img.gz gzip -dc >/dev/sda

I once made a benchmark and found using dd slower than cat for a straight copy between different disks. I would expect the pipe to make any solution involving dd even slower in this case.

You don't need to use redirection or piping at all.

</dev/sda gzip -c >/mnt/sdb1/backups/disk.img.gz
</mnt/sdb1/backups/disk.img.gz gzip -dc >/dev/sda

I once made a benchmark and found using dd slower than cat for a straight copy between different disks. I would expect the pipe to make any solution involving dd even slower in this case.

You don't need to use dd or piping at all.

</dev/sda gzip -c >/mnt/sdb1/backups/disk.img.gz
</mnt/sdb1/backups/disk.img.gz gzip -dc >/dev/sda

I once made a benchmark and found using dd slower than cat for a straight copy between different disks. I would expect the pipe to make any solution involving dd even slower in this case.

1
source | link