[TUHS] moving directories in svr2
Dan Stromberg
drsalists at gmail.com
Thu Dec 30 15:14:29 AEST 2021
On Wed, Dec 29, 2021 at 8:18 AM Clem Cole <clemc at ccc.com> wrote:
> Where and when did mvdir(1) appear? It's not in Research or BSD.
>
> FWIW: in the old days, I just used tar cf - . | (cd some_place_else; tar
> xvpf - ) preserving permissions. The hardlink scheme of cpio was the
> one thing it could do that the original tar did not.
>
I'm partial to:
(cd /source/dir && tar cf - .) | (cd /dest/dir && tar xfp -)
The &&'s make it so a typo is less likely to do something odd or even
damaging.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20211229/70c4b3e3/attachment.htm>
More information about the TUHS
mailing list