From owner-freebsd-questions@FreeBSD.ORG Sat Sep 6 05:00:57 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2364916A4BF for ; Sat, 6 Sep 2003 05:00:57 -0700 (PDT) Received: from remt21.cluster1.charter.net (remt21.cluster1.charter.net [209.225.8.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5524B43FEA for ; Sat, 6 Sep 2003 05:00:56 -0700 (PDT) (envelope-from chowse@charter.net) Received: from [66.168.145.25] (HELO moe) by remt21.cluster1.charter.net (CommuniGate Pro SMTP 4.0.6) with ESMTP id 148013743; Sat, 06 Sep 2003 08:00:54 -0400 From: "Charles Howse" To: Date: Sat, 6 Sep 2003 07:00:48 -0500 Message-ID: <000c01c3746e$832b8d80$04fea8c0@moe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: <44ad9i4nns.fsf@be-well.ilk.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal cc: lowell@be-well.no-ip.com Subject: RE: FBSD equivalent to Linux cp -u X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2003 12:00:57 -0000 > > I have read man cp, and I don't see a way to copy source file to > > destination file *only* if source file is newer than > destination file. > > > > In Linux, I could do cp -u. Is there another utility that > can pull this > > off? > > In sh(1), it should be as simple as: > > if [ $sourcefile -nt $destinationfile ] ; > then > cp -p $sourcefile $destinationfile ; > fi > > [untested] Thanks, Lowell. Once again I've had an attack of the dumb-ass! :-)