Define the following alias:
tar cvf - . | ( cd \!* ; tar xvf - )
or as an alias:
alias cpbytar 'tar cvf - . | ( cd \!* ; tar xvf - )'
(The alias definition above is for CSH)
To do a recursive copy of a directory to another location, preserving the PERMISSIONS and OWNERSHIP of the files. "cd" to the source location and invoke the following alias
Return to : Unix System Administration
Hints and Tips