LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-21-2004, 09:54 AM   #1
bmeckle
Member
 
Registered: Jun 2004
Posts: 60

Rep: Reputation: 15
find files older than another file


I have recently been asked how one goes about finding files older that another file in a directory and removing them. I know how to find files newer than another file, but older appears to be a bit of a problem. Does anybody know how to do this?

Things I have looked at, find (mtime, atime, ctime, newer) - nothing on older though.

Thanks in advance for any help you have to offer.
 
Old 10-21-2004, 10:43 AM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
I could be wrong (what are the chances?) but doesn't ! mean not? So wouldn't ! -newer be the same as older?
 
Old 10-21-2004, 10:50 AM   #3
bmeckle
Member
 
Registered: Jun 2004
Posts: 60

Original Poster
Rep: Reputation: 15
You would be correct in that statement. ! -newer works great. Thank you very much.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting Files Older Than 2 Hours using Find? LinuxGeek Linux - Software 1 06-29-2005 06:10 AM
Older, smaller versions of distros? Where to find? mhelliwell Linux - Distributions 10 03-20-2005 06:51 PM
Where to find specific older deb packages? elfoozo Debian 3 12-23-2004 06:16 PM
how to find a specific file over several *.tgz files eeyoree Slackware 6 08-09-2004 12:37 AM
snort error: newly created file is older than distributed files! rufassa Linux - Security 1 11-07-2003 08:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration