cp options
Matthew Seaman
m.seaman at infracaninophile.co.uk
Fri Feb 27 04:14:48 PST 2004
On Fri, Feb 27, 2004 at 05:12:24PM +1300, Tom Munro Glass wrote:
> Linux cp has a --link option that makes hard links instead of copies of
> non-directories. The FreeBSD cp doesn't appear to have that option.
>
> Is there a way of achieving this?
Yes. Use find(1)/cpio(1) -- so, to create a 'link tree' of your entire home
directory under /tmp, you would do:
% cd ${HOME}
% find . -print | cpio -pvdl /tmp
That assumes that ${HOME} and /tmp are on the same device, which is
probably not true, but you get the general idea.
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040227/930da151/attachment.bin
More information about the freebsd-questions
mailing list