From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 29 20:30:08 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 307D416A4DD for ; Sat, 29 Jul 2006 20:30:08 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95EC943D46 for ; Sat, 29 Jul 2006 20:30:07 +0000 (GMT) (envelope-from kientzle@freebsd.org) Received: from [10.0.0.221] (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id k6TKTujU091598; Sat, 29 Jul 2006 13:30:01 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <44CBC544.4090500@freebsd.org> Date: Sat, 29 Jul 2006 13:29:56 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 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=us-ascii; 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: Sat, 29 Jul 2006 20:30:08 -0000 Eric Anderson wrote: > So, you can mimic an entire tree with something like: > cp -al /from/ /to/ pax -rwl -pe /from /to is almost what you want. (It requires that /to exist first, though.) If you want to match the 'cp' semantics when /to does not exist, you can use pax's rewrite option: pax -rwl -pe -s|/from|/to| /from / As a bonus, this works on any machine that meets POSIX, unlike every other option that's been mentioned in this thread (tar and cpio were both dropped from the POSIX standard a decade ago). Tim