How does one copy a path, preserving permissions, timestamp, and ownership?

I have a path like so:

./t1/a/b/c/d/e/

with each folder in the tree having numerous files.  I would like to
copy the path without copying the files so that I have two identical
paths with different roots:

./t1/a/b/c/d/e/
./t2/a/b/c/d/e/

The paths are identical, i.e. have the same permissions, timestamp,
and ownership.

One way to do this is to use rsync followed by an rm:

rsync -va ./t1/ ./t2/
find ./t2 -not -type d | xargs rm

but it seems silly to create a copy of a large number of files only to
remove them.

Thoughts?

Regards,
- Robert

-- 
Central West End Linux Users Group (via Google Groups)
Main page: http://www.cwelug.org
To post: [email protected]
To subscribe: [email protected]
To unsubscribe: [email protected]
More options: http://groups.google.com/group/cwelug

Reply via email to