From: Tom Linden <tom@kednos.com>
Subject: SUMMARY: Searching for new files?
Date: Mon, 02 Sep 2002 08:24:50 -0700 [thread overview]
Message-ID: <CIEJLCMNHNNDLLOOGNJIIEIJFKAA.tom@kednos.com> (raw)
In-Reply-To: <ED9FF2AF91C4DA42BA4BB8372DBC8C9710D46E@VESTMB202B.tdk.dk>
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@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
parent reply other threads:[~2002-09-02 15:24 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <ED9FF2AF91C4DA42BA4BB8372DBC8C9710D46E@VESTMB202B.tdk.dk>]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox