bin/57054: let test(1) compare the mtime of a file to a string

Jilles Tjoelker jilles at stack.nl
Sat May 30 22:20:05 UTC 2009


The following reply was made to PR bin/57054; it has been noted by GNATS.

From: Jilles Tjoelker <jilles at stack.nl>
To: bug-followup at FreeBSD.org, joost at 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


More information about the freebsd-bugs mailing list