Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That has only one minor advantage compared to:

  mysqldump -u mysql db | ssh user@rsync.net "cat > db_dump"
Namely, the syntax is one character shorter. (But only because I used whitespace around >).

With dd, you can control the transfer units (the size of the read and write system calls which are performed) whereas cat chooses its own buffering. However, this doesn't matter on regular files and block devices. The transfer sizes only matter on raw devices where the block size must be observed. E.g. traditional tape devices on Unix where if you do a short read, or oversized write, you get truncation.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: