From owner-freebsd-questions Thu Mar 7 21:56: 9 2002 Delivered-To: freebsd-questions@freebsd.org Received: from hotmail.com (f169.law7.hotmail.com [216.33.237.169]) by hub.freebsd.org (Postfix) with ESMTP id 5B0E137B404 for ; Thu, 7 Mar 2002 21:56:03 -0800 (PST) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 7 Mar 2002 21:56:03 -0800 Received: from 63.170.174.190 by lw7fd.law7.hotmail.msn.com with HTTP; Fri, 08 Mar 2002 05:56:02 GMT X-Originating-IP: [63.170.174.190] From: "Jon Larssen" To: freebsd-questions@freebsd.org Subject: find(1) usage Date: Fri, 08 Mar 2002 05:56:02 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 08 Mar 2002 05:56:03.0145 (UTC) FILETIME=[EE153B90:01C1C665] Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I have a backup directory of some important system files, for instance, backup/etc/master.passwd, backup/etc/groups, etc. Now, if I'm standing just on backup's parent, I can find the files I need to backup, like: find backup/ -name "*" ! -type d -print and the result would be backup/etc/master.passwd backup/etc/groups etc. Now, I'd like to use the -exec expression of find(1) to obtain the following (sample) command: cp -p /etc/master.passwd backup/etc/master.passwd I know there's a thingy, {}, that would give the whole path (backup/etc/master.passwd, for instance). Now, how can I erase the backup part? Is this doable just with clever use of find(1)? Best regards, Jon. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message