|
hi all,
could someone tell me how to find out files modified in a date range under a directory?
i'm trying to write a simple shell script to see if i'm still a newbie here, and finally the result convinced me that i am ! 
these are my foot steps,
intention: print out file names which are modified during a date range.
1. i want to display file names that are modified from 2007.01.01 to
2008.01.01 , so i created 2 files and compared each file in current
directory with them.
$ touch tempstart -t 200701010000
$ touch tempend -t 200801010000
2. then using them to fileter out file modified between 2007.01.01 and 2008.01.01
$ find . -cnewer tempstart -and ! -cnewer tempend
everything sees ready , but the fact is it could not find out anything
while using "ls -lh" command to list file details, i do see files there:
-rwxr-xr-x 1 zpxu zpxu 138M 2008-02-17 22:39 eclipse-SDK-3.3.1.1-linux-gtk.tar.gz
drwxr-xr-x 2 zpxu zpxu 8.0K 2008-02-17 23:08 exewindows
-rwxr-xr-x 1 zpxu zpxu 44M 2004-10-10 12:10 jdk150.chm
-rwxr-xr-x 1 zpxu zpxu 409K 2006-12-03 12:33 mysql-connector-java-3.1.10-bin.jar
-rwxr-xr-x 1 zpxu zpxu 388K 2006-12-16 20:29 mysqldriver.jar
drwxr-xr-x 2 zpxu zpxu 8.0K 2007-09-20 22:06 spring
-rwxr-xr-x 1 zpxu zpxu 7.1M 2007-08-10 14:37 squirrel-sql-2[1].0final-install.jar
-rwxr-xr-x 1 zpxu zpxu 0 2008-01-01 00:00 tempend
-rwxr-xr-x 1 zpxu zpxu 0 2007-01-01 00:00 tempstart
-rwxr-xr-x 1 zpxu zpxu 67 2008-09-29 14:06 test.sh |
|