bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hi small improvement to find command.


From: Prashant Sharma
Subject: Re: Hi small improvement to find command.
Date: Tue, 29 Jan 2013 13:54:03 +0530

The need for this arose with following scenario.
I have stream processing engine doing some random stuff and creating a lot
of files in the process. And since I did not wrote it myself and people who
wrote it do not have clearing up mechanism for the files that accumulate
and tend to either fill Inodes or File-system.

So needed a way for clearing things up older than 30 seconds. Ofcourse I
can touch a dummy file and then sleep for 30 seconds and then use find
-newer. But that sounds like so much for so less and for that matter, one
can parse the output of stat in perl or even in bash and do the same thing.
In this case a single line command might sound like an improvement.


On Tue, Jan 29, 2013 at 1:42 PM, Bernhard Voelker
<address@hidden>wrote:

> Added the list again.
>
> On 01/29/2013 08:28 AM, Prashant Sharma wrote:
> > On 01/29/2013 08:10 AM, Bernhard Voelker wrote:
> >> On 01/29/2013 07:02 AM, Prashant Sharma wrote:
> >>> I was curious about the communities interest in a small improvement to
> >>> mtime's precision from days to seconds, hours and minutes.
> >>>
> >>> something like
> >>>
> >>> find . -type f -mtime +1m would give me files modified in last one
> minute.
>
> >>        -mmin n
> >>               File's data was last modified n minutes ago.
>
> > Thanks Berny,
> >
> > I am aware about it. Needed for seconds too, It might sound very
> > specific use case. But just wanted to see if people are
> > interested in it.
> >
> > We may not violate POSIX standard[1] by keeping the default as is
> > in days. And mmin is any way not standard[1]. Please
> > pardon me and enlighten me, if I am being stupid about something
> > because that is quite possible for my level of experience.
> >
> > 1.http://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html(2008)
>
> Ah, then I got you wrong.
> Of course implementing such a change would be technically possible,
> but I'm unsure wether it would make it into the GNU find's Git repo.
>
> I personally don't see much gain for this.
> a) although we are in 2013, network-mounted file systems can still
> have clock up to 2-3 minutes.
> b) There are well-known workarounds using another file and
> 'find -newer ...'.
>
> I'm not long enough on this list to give other arguments.
> Did you search the archive for similar discussions?
>
> Have a nice day,
> Berny
>



-- 
s


reply via email to

[Prev in Thread] Current Thread [Next in Thread]