From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 27 17:44:15 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 EF39516A4E1 for ; Thu, 27 Jul 2006 17:44:15 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx23.fluidhosting.com [204.14.89.6]) by mx1.FreeBSD.org (Postfix) with SMTP id 62DC843D6E for ; Thu, 27 Jul 2006 17:44:12 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 10769 invoked by uid 399); 27 Jul 2006 17:44:11 -0000 Received: from localhost (HELO ?192.168.0.3?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 27 Jul 2006 17:44:11 -0000 Message-ID: <44C8FB65.9020102@FreeBSD.org> Date: Thu, 27 Jul 2006 10:44:05 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5.0.4 (X11/20060604) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.ORG References: <200607271150.k6RBoM9p031745@lurza.secnetix.de> In-Reply-To: <200607271150.k6RBoM9p031745@lurza.secnetix.de> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: 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 17:44:16 -0000 Oliver Fromme wrote: > 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. > > -P is the default anyway, so -a would only replace -Rp. > I don't think saving one letter justifies introducing a new > option. You can use an alias or shell function. > > > -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/ > > > > and it's fast too! > > You can do the same with existing tools in a portable > (and thus preferable) way: > > cd /from; find -d . | cpio -dumpl /to While I don't want to stifle anyone's creativity, I agree with Oliver (and other posters) on this one. The Unix way of doing things is small programs that do their jobs well, tied together to accomplish bigger things. Doug -- This .signature sanitized for your protection