Hacker News new | ask | show | jobs
by 8fingerlouie 2808 days ago
I use tar daily, so yes, i remember the syntax :)

copy files from a to b:

    (cd /src && tar cf - .) | (cd /dest && tar xf -)

operations are easy :(c)reate, e(x)tract, (t)est options the same: (f)ile, (v)erbose, g(z)ip compression. the only illogical ones is bzip2 compression and xz compression with -j and -J

I think i can remember cpio syntax as well, though i haven't used that i a decade, but did use it quite often in my old sysadm job.

copy files from a to b by piping :

    find /somewhere -print | cpio -o | (cd /destination && cpio -i)
or simply for all you kids:

    find /somewhere -print | cpio -p /destination
2 comments

Well, it turns out we have different expectations regarding those tools.

My brain chooses to store other things in life.

This seems to imply that he is not 'storing other things in life' because he's able to remember that L=local forwarding R=remote forwarding and D=socks proxy
The irony being that remembering that is almost guaranteedly easier than acquiring and installing mole on every machine where you may need to Port forward.
It was fun when I mixed up source and destination in my tar command and overwrote 4 hours of work ;)