Date: Mon, 14 Apr 2003 09:41:54 +0200 From: Riccardo Torrini <riccardo@torrini.org> To: Jan Schlesner <schlesner@physik.TU-Berlin.DE> Cc: freebsd-current@FreeBSD.ORG Subject: Re: Unix epoch changed? Message-ID: <20030414074154.GG3965@trudy.torrini.home> In-Reply-To: <20030413122948.GA42211@physik.TU-Berlin.DE> References: <200304091025.LAA13913@sorley.cogsci.ed.ac.uk> <20030409123257.GA3598@trudy.torrini.home> <20030413122948.GA42211@physik.TU-Berlin.DE>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Apr 13, 2003 at 02:29:48PM +0200, Jan Schlesner wrote: >> Ok, I remember wrong. But the question remain: why find -mtime -2 >> show a file from 1906 (near 100 year ago) instead of 2 days old? > Try to use "-mtime 2" instead of "-mtime -2". ;-) > ^ ^^ It's not the same: positive_2 match file that are exactly 2 day old but where negative_2 match file old from 0 upto 2 day. I need the second :-( And is documented, not a my invention... # man find [...] Any number of units may be combined in one -atime argument, for example, ``-atime -1h30m''. Units are probably only useful when used in conjunction with the + or - modifier. [...] # find /usr/ports/distfiles -mtime 20 -exec ls -land {} \; | \ sed 's/^..........[ 0-9]* //' Mar 25 11:10 /usr/ports/distfiles/gnome2 Mar 25 11:10 /usr/ports/distfiles/gnome2/docs Mar 25 11:08 /usr/ports/distfiles/xc Mar 25 11:10 /usr/ports/distfiles/KDE # find /usr/ports/distfiles -mtime -20 -exec ls -land {} \; | \ sed 's/^..........[ 0-9]* //' Apr 4 14:40 /usr/ports/distfiles Mar 25 11:10 /usr/ports/distfiles/gnome2 Mar 25 11:10 /usr/ports/distfiles/gnome2/docs Apr 7 14:30 /usr/ports/distfiles/bdb Apr 4 14:31 /usr/ports/distfiles/vim Mar 25 11:08 /usr/ports/distfiles/xc Dec 21 1909 /usr/ports/distfiles/xc/X336src-2.tgz Dec 21 1909 /usr/ports/distfiles/xc/X336src-1.tgz Mar 25 11:10 /usr/ports/distfiles/KDE Dec 12 1909 /usr/ports/distfiles/mirrormagic-1.3.tar.gz # find /usr/ports/distfiles -mtime 21 -exec ls -land {} \; | \ sed 's/^..........[ 0-9]* //' [...empty list...] # find /usr/ports/distfiles -mtime -21 -exec ls -land {} \; | \ sed 's/^..........[ 0-9]* //' Apr 4 14:40 /usr/ports/distfiles Mar 25 11:10 /usr/ports/distfiles/gnome2 Mar 25 11:10 /usr/ports/distfiles/gnome2/docs Apr 7 14:30 /usr/ports/distfiles/bdb Apr 4 14:31 /usr/ports/distfiles/vim Mar 25 11:08 /usr/ports/distfiles/xc Dec 21 1909 /usr/ports/distfiles/xc/X336src-2.tgz Dec 21 1909 /usr/ports/distfiles/xc/X336src-1.tgz Mar 25 11:10 /usr/ports/distfiles/KDE Dec 12 1909 /usr/ports/distfiles/mirrormagic-1.3.tar.gz -- Riccardo.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030414074154.GG3965>