LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-16-2009, 02:47 AM   #1
basher400
Member
 
Registered: Mar 2005
Posts: 54

Rep: Reputation: 15
finding files that were created before a certain date


Hi

I need to find files with certain names that were uploaded to the server from a certain date.

this is what I tried:
Code:
touch -d "18 may 2009 17:54:19" date_marker
find /home/mash -iregex '.*[^a-z0-9 \_\.\/\-].*'  -cnewer date_marker -ls
it seems to list files that were created before that date I specified.

I also tried:
Code:
find /home/mash -iregex '.*[^a-z0-9 \_\.\/\-].*' -mtime -30 -ls
and
Code:
find /home/mash -iregex '.*[^a-z0-9 \_\.\/\-].*' -ctime -30 -ls
but the above seems to list files that were modified or changed in the that period of time and not just the created ones.

I need only NEW files because that is how I know the date they were uploaded.

suggestions ?
 
Old 06-16-2009, 03:44 AM   #2
BeacoN
Member
 
Registered: Nov 2008
Distribution: Linux Mint
Posts: 56

Rep: Reputation: 17
find format

Hey Basher,
the -cnewer flag seemed to work fine on Debian 5.0 I'm using, however I didn't use the iregex or ls flags.
Maybe try testing it without those flags just to be sure the -cnewer command is working right first?
 
Old 06-16-2009, 03:46 AM   #3
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
Does this help any?

Code:
[admiral@glitch test]$ find . ! -newer marker -ls
753675    4 -rw-rw-r--   1 admiral    admiral           0 Jun 15  2006 ./marker
753821    4 -rw-rw-r--   1 admiral    admiral           0 Jun  1  2006 ./first
[admiral@glitch test]$ find . -newer marker -ls
753674    8 drwxrwxr-x   2 admiral    admiral        4096 Jun 16 00:04 .
753920    4 -rw-rw-r--   1 admiral    admiral           0 Jun 30  2006 ./last
 
  


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
Sort files under a folder by created date Kunsheng Programming 3 05-11-2009 05:58 AM
find out the files created on a particular date. ZAMO Linux - General 3 02-08-2008 02:38 AM
How to - list files that were created aftre certain date kaprasanna Linux - Newbie 2 12-10-2007 04:50 AM
ow do I delete all files which were created on a specific date marsguy Linux - General 9 08-21-2007 09:15 AM
Date interrogation for files created chunky Linux - General 2 08-03-2004 04:31 PM


All times are GMT -5. The time now is 08:32 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration