exact copies in unix

Thursday, May 03, 2007

So often you want to copy files and folders between directories, but using cp all the file permissions are stuffed up and symlinks just cause problems. Not with good old tar!

cd into source dir

$ tar cf - * | (cd ../targetdir; tar -xf -)

with 'sudo' before each tar if required.

It's too good!

examining pkg package contents

On mac osx

$ lsbom {package name}.pkg/Contents/Archive.bom


Very handy for uninstalls!