yeah I am just a simple guy... that is too complicated for me!
Let's see.... find -maketime ? type file -deletefile

see, too complicated!

On Tue, Nov 24, 2020 at 7:20 PM Patrick Shanahan <[email protected]> wrote:
>
> * Michael <[email protected]> [11-24-20 19:14]:
> > find it easier to:
> >
> > sudo updatedb
> > locate <file>
> >
> > well that might be because I never learned the find command but still
> > it works for me.
> >
> > On Tue, Nov 24, 2020 at 2:53 PM Anton Aylward <[email protected]> 
> > wrote:
> > >
> > > On 24/11/2020 12:09, Patrick Shanahan wrote:
> > > > * Sakke K <[email protected]> [11-24-20 12:01]:
> > > >> locate is a faster command than find.
> > > >> For example, locate _A250256.ORF.xmp
> > > >
> > > > yes, find actively scans your file structure while locate just look into
> > > > its database.  but the database must be up-to-date or your locate will
> > > > fail.
> > >
> > > RTFM
> > > Just to clarify from TFM:
> > > ==============================================================================
> > > locate(1)                                   General Commands Manual
> > >
> > > NAME
> > >         locate - find files by name
> > >
> > > SYNOPSIS
> > >         locate [OPTION]... PATTERN...
> > >
> > > DESCRIPTION
> > >         locate  reads  one or more databases prepared by updatedb(8) and
> > >         writes file names matching at least one of the PATTERNs to 
> > > standard
> > >         output, one per line.
> > >
> > >         ...
> > >
> > >         By  default,  locate does not check whether files found in 
> > > database
> > >         still exist (but it does require all parent directories to exist 
> > > if
> > >         the database was built with --require-visibility no).  locate  can
> > >         never report files created after the most recent update of the 
> > > relevant
> > >         database.
> > > ===========================================================================
> > >
> > > So if you've uploaded (or relocated after uploading to a scratch 
> > > directory)
> > > since the last update to the relevant databases, 'locate' is not going to 
> > > be
> > > useful.  'find', by comparison deals with what is actually in the file 
> > > system
> > > right now.
> > >
> > > The man page on 'updatedb' says it is refreshed daily by 'cron', but on 
> > > some
> > > systems it is done by a systemd timer unit.
> > >
> > > Either way, it may not, on you system, be enabled by default.  It isn't 
> > > on mine.
> > > So I prefer to use 'find'.  Which is more flexible about such matters 
> > > time and
> > > size and the ability run subcommands such as 'exifgrep' on any potential 
> > > match.
> > >
> > >
> > > ____________________________________________________________________________
> > > darktable user mailing list
> > > to unsubscribe send a mail to 
> > > [email protected]
> > >
> >
> >
> > --
> > :-)~MIKE~(-:
> > ____________________________________________________________________________
> > darktable user mailing list
> > to unsubscribe send a mail to [email protected]
>
>
> except that updating the locate db more than likely takes quite a bit
> longer than a more localized find command.
>
> but locate will be easier for you if that is what you understand and do
> not understand find.
>
> that said, find is very handy once you learn it as it has many
> applications.  I automagically remove files in a particular directory
> based on their file-date:
>   find  -mtime +22 -type f -delete
>
> Just one example.
>
>
>
> --
> (paka)Patrick Shanahan       Plainfield, Indiana, USA          @ptilopteri
> http://en.opensuse.org    openSUSE Community Member    facebook/ptilopteri
> Photos: http://wahoo.no-ip.org/piwigo               paka @ IRCnet freenode
> ____________________________________________________________________________
> darktable user mailing list
> to unsubscribe send a mail to [email protected]
>


-- 
:-)~MIKE~(-:
____________________________________________________________________________
darktable user mailing list
to unsubscribe send a mail to [email protected]

Reply via email to