SUMMARY: Searching for new files?

From: Tom Linden <tom_at_kednos.com>
Date: Mon, 02 Sep 2002 08:24:50 -0700

A number of responses all based on, find.

Original Question

>> Does anyone ahave a method to find all files
>> modified or created since or before a certain
>> date?

>
>The easiest way to find all the file that are newer than a certain date is
>to touch a file using the -t option to set the date/time and then use the
>find command. For example to find all the file that are newer than
>9:29pm on
>the 1st September, use the following commands:
>
>touch -t 09012119 timestamp_file
>
>find /path -newer timestamp_file
>
>By adding the -type option, the find command can be limited to files, link,
>directories, etc.
>
>If you wish to find files that are older than that date/time, use the
>command:
>
>find /path ! -newer timestamp_file
>
>Hope this helps,
>
>Michael Bradford


and from Gavin Kreuiter [gavin_at_dhsolutions.co.za]

Two ways, both using find:

If you want files newer than a number of days, use:

        find / -type f -mtime -NUMBER

Where NUMBER is the number of 24-houtr periods. For example, finding
all files modified in the last 48 hours:
        find / -type f -mtime -2

Alteratively, use "touch" and the -newer option of find:

        touch -t 200112312359 ref
        find / -type f -newer ref
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002
Received on Mon Sep 02 2002 - 15:36:37 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:43 NZDT