[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tar and ssh
Greg Thomas <getbsd@sbcglobal.net> wrote:
> I used dd for my dump method. What are the pros and cons of using cat
> or dd with tar?
If you write to a file it doesn't matter. dd gives you control
over the size of the write()s, which translates to the blocksize
used on a tape device, where this can be important for compatibility,
performance, etc. However, if you are writing to a tape, you
probably want to use some buffering tool (e.g. ports/misc/buffer)
anyway.
People often seem to mistake dd for some magic low-level tool,
because it is usually used when accessing raw devices, and its
unusual syntax adds to its exotic flair. In fact, dd just copies
data from input to output using plain read() and write() system
calls. It does allow you to specify the size of the data chunks
read/written, though, which can be meaningful to the device driver.
--
Christian "naddy" Weisgerber naddy@mips.inka.de