FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 01-28-2011, 11:18 AM
Martin McCormick
 
Default 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
 
Old 01-28-2011, 11:24 AM
Ian Coetzee
 
Default 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
 
Old 01-28-2011, 12:57 PM
Martin McCormick
 
Default 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
 

Thread Tools




All times are GMT. The time now is 01:41 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org