Archive for the ‘Linux’ Category

Tiny computers for big effect

Saturday, March 27th, 2010

So, I just purchased one of these:

and after installing some of this:

http://linux.voyage.hk/

and a little tweaking, there is lots of nice things to come. Stay tuned!

Piping tar datastream over SSH

Tuesday, August 4th, 2009

How to use tar to copy everything in /usr/local/stuff to remote’s /backup (because I always forget how this is done),

cd /usr/local/stuff
tar cf - . | ssh remote "cd /backup; tar xf -"

Basically, you’re telling tar to tar up everything in your current directory (.) and send it to -, which is standard out; this is piped to ssh, which (once logged in) will send it to standard input of the process it runs, in this case tar.

Other way round:

ssh remote "cd /usr/local/stuff; tar cf - ." | tar xf -

will copy everything from /usr/local/stuff to your current directory.

(Original source: http://macosx.com/forums/unix-x11/16999-piping-tar-datastream-over-ssh.html)