Hacker News new | ask | show | jobs
by rotifer 1334 days ago
I rarely use dd, but my most common use might be:

    blah | sudo dd of=/some/file
where:

    blah | sudo cat > /some/file
wouldn't work.
2 comments

    blah | sudo tee /some/file > /dev/null
would though. Both are probably fine.
If 'blah' outputs binary data, then that would work, but would spew garbage to the terminal. Piping to 'dd' is probably more efficient regardless.
But this one would work:

blah | sudo sh -c 'cat > /some/file'