From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 27 03:51:14 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0748016A4DD for ; Thu, 27 Jul 2006 03:51:14 +0000 (UTC) (envelope-from prvs=julian=356e8a28d@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB08443D4C for ; Thu, 27 Jul 2006 03:51:13 +0000 (GMT) (envelope-from prvs=julian=356e8a28d@elischer.org) Received: from unknown (HELO [192.168.2.4]) ([10.251.60.53]) by a50.ironport.com with ESMTP; 26 Jul 2006 20:51:13 -0700 Message-ID: <44C83831.5050900@elischer.org> Date: Wed, 26 Jul 2006 20:51:13 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Anderson References: <44C82A40.3020009@centtech.com> In-Reply-To: <44C82A40.3020009@centtech.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers Subject: Re: [PATCH] adding two new options to 'cp' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jul 2006 03:51:14 -0000 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 >