Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu User (http://www.linux-archive.org/ubuntu-user/)
-   -   My find command isn't finding with -mmin # (http://www.linux-archive.org/ubuntu-user/482278-my-find-command-isnt-finding-mmin.html)

Martin McCormick 01-28-2011 11:18 AM

My find command isn't finding with -mmin #
 
I must be interpreting the manual wrong for I can't seem to get
find to locate files using the -mmin # directive. It looks like
one should be able to do:

find . -name "*" -daystart -mmin 120 -print

and it should list all files 2 hours old or newer. It is actually
finding nothing although there are files in the directory that
match the test.

find . -name "*" -daystart -cnewer testfile -print

works but I want to find all files that were created or modified
in the last n minutes.

Thank you for any help.

Martin McCormick WB5AGZ Stillwater, OK
Systems Engineer
OSU Information Technology Department Telecommunications Services Group

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Ian Coetzee 01-28-2011 11:24 AM

My find command isn't finding with -mmin #
 
On Fri, Jan 28, 2011 at 2:18 PM, Martin McCormick <martin@dc.cis.okstate.edu> wrote:


I must be interpreting the manual wrong for I can't seem to get

find to locate files using the -mmin # directive. It looks like

one should be able to do:



find . -name "*" -daystart -mmin 120 -print

I have it that it should be

find . -name "*" -daystart -mmin -120 -print

There should be a "-" in front of the 120, as per:



Numeric arguments can be specified as

****** +n**** for greater than n,

****** -n**** for less than n,

****** n***** for exactly n.

Regards
Ian

<Snip>

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Martin McCormick 01-28-2011 12:57 PM

My find command isn't finding with -mmin #
 
Ian Coetzee writes:
> find . -name "*" -daystart -mmin -120 -print
>
> There should be a "-" in front of the 120, as per:
>
> Numeric arguments can be specified as
>
> +n for greater than n,
>
> -n for less than n,
>
> n for exactly n.

Oh, yes. I forgot that part. Thank you. I also discovered that
-daystart needs to go after the -mmin # option. When I first
tried it, it still did not work so I tried +120 which would get
everything older than 2 hours and it found all kinds of stuff as
this was the top of my home directory. So I tried -14400 which
is 24 hours worth of minutes and it then did find the newer
files. putting -daystart after -mmin -120 makes it all work
perfectly. This is a great help.

Martin McCormick

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


All times are GMT. The time now is 02:28 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.