From owner-freebsd-bugs@FreeBSD.ORG Sat May 30 22:20:05 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 603A11065673 for ; Sat, 30 May 2009 22:20:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 343BE8FC16 for ; Sat, 30 May 2009 22:20:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n4UMK474046332 for ; Sat, 30 May 2009 22:20:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4UMK4Sn046330; Sat, 30 May 2009 22:20:04 GMT (envelope-from gnats) Date: Sat, 30 May 2009 22:20:04 GMT Message-Id: <200905302220.n4UMK4Sn046330@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Jilles Tjoelker Cc: Subject: Re: bin/57054: let test(1) compare the mtime of a file to a string X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jilles Tjoelker List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 May 2009 22:20:05 -0000 The following reply was made to PR bin/57054; it has been noted by GNATS. From: Jilles Tjoelker To: bug-followup@FreeBSD.org, joost@bps.jodocus.org Cc: Subject: Re: bin/57054: let test(1) compare the mtime of a file to a string Date: Sun, 31 May 2009 00:16:54 +0200 You can already do this using a command like [ -n "$(find "$file" -prune -newermt '4 days ago')" ] This can also be adapted to compare access, inode change and inode birth (UFS2) times. Yet another way is to touch(1) a temporary file and then use the -nt or -ot primaries in test(1) with that. -- Jilles Tjoelker