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: Wed, 30 Jan 2013 12:16:42 +0530

On Wed, Jan 30, 2013 at 1:48 AM, Eric Blake <address@hidden> wrote:

> On 01/29/2013 01:24 AM, Prashant Sharma wrote:
>
> [Please don't top-post on technical lists]
>
> > 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.
>
> Why not just touch the file 30 seconds into the past to begin with?
> There's no need to sleep, since touch is for more than just the current
> timestamp.
>
> Sounds right! will try it.


> > 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.
>
> Consider - we gave you a solution (with touch and -newer) that works now
> (and complies with POSIX), vs. the delay of waiting for adding a new
> extension feature and percolating it into your distro (probably a
> process of a couple of years, even if we do decide to enhance find, and
> even then, limits you to GNU find instead of POSIX).  It's hard to
> justify adding a new feature if existing standard features already work
> without too much additional effort.
>
> However, you are correct that we can add suffix parsing to -mtime
> without violating POSIX, so it might make a nice syntactic sugar
> addition.  If you are willing to write the patch, including
> documentation and testsuite additions, your proposal will get a lot
> further.  But for now, it appears that no one else is interested in
> implementing it on your behalf.
>
> I think, I am ready to try a patch given some time. Please assign me an
issue from the bug tracker.

>  --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>
-- 
s


reply via email to

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