Re: [PATCH] adding two new options to 'cp'
- From: Julian Elischer <julian@xxxxxxxxxxxx>
- Date: Wed, 26 Jul 2006 20:51:13 -0700
Eric Anderson wrote:
I'm tired of trying to use rsync or gcp (which doesn't like symlinks often) to copy trees of files/directories using hard links, so I added the gcp-ish options -a and -l.
-a is 'archive' mode, which is just a quick form of -PpR.
-l is 'link' mode, where regular files get hard linked instead of copied.
So, you can mimic an entire tree with something like:
cp -al /from/ /to/
I've always used:
find . -depth |cpio -pdlmv $dest
(fully portable) but your addition can't hurt (well it might make the larger program load a bit slower
but it isn't that much.)
_______________________________________________
and it's fast too!
Patch is against 6-STABLE, but works well on 7-CURRENT as well.
Patch is here (with man page edits):
http://www.googlebit.com/freebsd/patches/cp-patch
cd /tmp/
fetch http://www.googlebit.com/freebsd/patches/cp-patch
cd /usr/src/
patch < /tmp/cp-patch
cd bin/cp
make && make install
Patch was done for rsnapshot users mainly (there are quite a few of us).
Comments? Flames? Committers willing to commit?
Eric
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: [PATCH] adding two new options to 'cp'
- From: Matthew D. Fuller
- Re: [PATCH] adding two new options to 'cp'
- References:
- [PATCH] adding two new options to 'cp'
- From: Eric Anderson
- [PATCH] adding two new options to 'cp'
- Prev by Date: Re: [PATCH] adding two new options to 'cp'
- Next by Date: Re: [PATCH] adding two new options to 'cp'
- Previous by thread: Re: [PATCH] adding two new options to 'cp'
- Next by thread: Re: [PATCH] adding two new options to 'cp'
- Index(es):
Relevant Pages
|
|