[haiku-development] Querying all file changed since 10 minutes ago (was: Where are the Sounds preference settings?)

  • From: Humdinger <humdingerb@xxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 06 Dec 2008 19:38:39 +0100

Ingo Weinhold wrote:
-- query for all files modified within the last 10 minutes
Should work with "last_modified>=%-10 minutes%" (the minus was missing).

I'm never sure if it's "before" or "after"... :)
The above lists every existing file, so I guess it should be "last_modified<=%-10 
minutes%".

That doesn't work either.
Dimmly I remember, asking about other "magic" words in queries, like "last Monday" or "yesterday" and IIRC Axel offered that Haiku is yet missing these things.
Could it be that "minutes" isn't recognized either?

> At least it does under BeOS. If it doesn't in Haiku, please file a ticket.

Hmmm. Or we are both mistaken. I just remembered this tip:
http://betips.net/1997/09/09/find-recently-modified-files/
in which Scot wrote this little script, which still works for files though it ignores new folders:

Now=$(date +%s)
Older=$(expr $Now - $@)
echo Files modified in the last $@ seconds :
query -a '(last_modified>='$Older')'


I still think the "magic" words don't work. If nobody intervenes, I'll file a bugreport for that.

Regards,
Humdinger

--
--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=--
Deutsche Haiku News @ http://haiku-gazette.blogspot.com

Other related posts: