Safely Copy Directories in Unix

August 18, 2005

I use this a lot when I need/want to mount a new partition into a directory location that I have been previously been using (i.e. Vinum configuration in FreeBSD). What’s great for me is that it will copy file permissions over properly – and better yet, if it fails partway through you don’t lose any data.
# mkdir newdir # cd olddir # tar -cf - . | ( cd newdir && tar -xf - )

You Don’t Need Another Sales Call. You Need an Answer.

30 minutes. No pitch. Just an honest conversation about where you are, what you need, and whether working together makes sense.

We use your details to set up and prepare for the call, and send the newsletter only if you ask for it. Privacy policy.