Score:0

mtime vs msec producing different result

ar flag

I've setup a little cron to compress log files of my application. Generally I need todays logs, so I can compress everything that is one day old or older.

Why do the two following commands behave different?

mtime is not finding anything at all, while using msec yields the desired result?

find /var/log/myapp/cronjobs/ -type f -mtime +1 -exec gzip {} \;

find /var/log/myapp/cronjobs/ -type f -msec +86400 -exec gzip {} \;

the mtime option does not yet compress files, which are now exactly 48 hours old...

any suggestions?

Edit: Ah, no, just noted: Oldest File is 1 day, 23.xx hours - so I assume that does not yet count as "older than 1 day", cause its rounded down to 1 day - and then not considered OLDER THAN, cause its "equal to".

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.