On Sat, 2006-01-07 at 18:28, Philip Tellis wrote:
> Sometime Today, NMK cobbled together some glyphs to say:
> 
> > How do I find the list of all files modified since yesterday? I know one
> > option would be
> > find / -mtime N
> > But this is a bit confusing. Should N be 1 or -1? Is there a better way?
> 
> N should be 1.  This is the best way, it should not be confusing.
> 
> Remember that 'difference' can never be negative.  The difference 
> between two quantities is always equal to the larger minus the smaller.
> 
> find / -mtime 1d would be more explicit.

[EMAIL PROTECTED] root]$ find / -mtime 1d
find: invalid argument `1d' to `-mtime'

Simply using 1 and omitting the d works.

[EMAIL PROTECTED] root]# ls -ld `find /root -mtime 1`
-rw-------    1 root     root      1331010 Jan  5 22:43
/root/evolution/local/Blug-Prog/mbox
-rw-------    1 root     root        54323 Jan  5 22:44
/root/evolution/local/Blug-Prog/mbox.ev-summary
-rw-------    1 root     root       102400 Jan  5 22:44
/root/evolution/local/Blug-Prog/mbox.ibex.index
-rw-------    1 root     root       180492 Jan  5 22:44
/root/evolution/local/Blug-Prog/mbox.ibex.index.data
-rw-------    1 root     root       211968 Jan  6 15:23
/root/evolution/local/Blug-Tech/mbox.ibex.index
-rw-------    1 root     root       618544 Jan  6 15:23
/root/evolution/local/Blug-Tech/mbox.ibex.index.data

<output snipped>

But why is it showing files that are modified on 5th Jan, ie
day-before-yesterday?

As per the find man page, it should show files modified N*24 hours ago,
thats 24 hours ago (6th Jan. to 7th Jan.).

Regards,
NMK.


-- 
http://mm.ilug-bom.org.in/mailman/listinfo/linuxers

Reply via email to