[H-GEN] What's wrong with this command?

Anthony Towns aj at azure.humbug.org.au
Sun Oct 1 22:33:05 EDT 2006


On Sun, Oct 01, 2006 at 07:34:54PM +1000, Clinton Roy wrote:
> >tar -czf - Jira/ | ssh root at diamond cat - > /misc/Jira.tgz
> That redirection to misc/Jira.tgz is being seen by the local shell,
> you need to do something so that the remote shell sees the
> redirection; quoting:

Or you could not use cat; eg:

   tar -czf - Jira/ | ssh root at diamond dd of=/misc/Jira.tgz

dd's useful for when you're trying to use sudo too. If you don't
have priveleges to do:

   find blah >/root/blah-contents.txt

you can rewrite it as:

   find blah | sudo dd of=/root/blah-contents.txt

Also, using dd gives you geek cred!

Cheers,
aj

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 155 bytes
Desc: Digital signature
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20061002/7ca26348/attachment.sig>


More information about the General mailing list