System Administration

find all files called master.css

 
SOLVED
Go to solution
Nobody's Hero
Valued Contributor

find all files called master.css

Im trying to find all files called master.css that are dated 11/5/10 and later.

Im having a bugger of a time with this.
I can get ones date 11/5/10, but how do you handle getting anything after that date also?
UNIX IS GOOD
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: find all files called master.css

Hi:

One way (assuming this is MMDDYY):

# touch -mt 20101105.00 /tmp/ref

# find /path -type f -newer /tmp/ref -print

Regards!

...JRF...
Nobody's Hero
Valued Contributor

Re: find all files called master.css

Geez, i didnt think of touching a file and bouncing off of that time stamp.

Thanks, worked perfect. I spent 2 hours on it, you took? 2 minutes?

thanks again
UNIX IS GOOD
Steven Schweda
Honored Contributor

Re: find all files called master.css

> I can get ones [...]

How did you do that?

> [...] I spent 2 hours on it, you took? 2
> minutes?

Perhaps because this forum is littered with
similar requests. It might be hard to search
for keywords like, say,
find later
or
find newer
without finding several. For what did _you_
search before asking?

Potentially informative:

man find
Dennis Handly
Acclaimed Contributor

Re: find all files called master.css

>I can get ones date 11/5/10, but how do you handle getting anything after that date also?

If you are good at subtracting dates you can do something like:
find . -mtime -185

All files modified in the last ~185 days.