hi:
i'm trying to list all the files in my public_html directory that have been modified in the last N days. i need them to be listed WITH the last modified date and sorted in order by date modified. directories too i guess.
i'm using this, but it's not working:
find -ctime -21 -exec ls -rtdl {} \;
it's listing files modified years ago and doesn't appear to be sorted properly...like so:
===
[root@spain
www.mydomain.com]# find -ctime -7 -exec ls -rtdl {} \;
-rw-rw-r-- 1 root user4 24 Jul 27 04:00 ./.htpasswd
drwxr-xr-x 3 apache user4 4096 Jul 6 00:30 ./log
-rw-r--r-- 1 apache user4 116312 Jul 20 18:46 ./log/error.log
-r-------- 1 apache user4 0 Jul 1 22:30 ./log/.no_delete
drwxr-xr-x 3 apache user4 4096 Jul 6 00:30 ./log/2006
drwxr-xr-x 2 apache user4 4096 Jul 6 00:30 ./log/2006/07
-rw-r--r-- 1 apache user4 3287023 Jul 21 00:30 ./log/2006/07/web.log
lrwxrwxrwx 1 apache user4 45 Jul 6 00:30 ./log/web.log -> /home/www/www.mydomain.com/log/2006/07/web.log
drwxr-xr-x 2 apache user4 4096 Jul 6 04:00 ./web/stats
-rw-r--r-- 1 apache user4 2141 Jul 21 04:00 ./web/stats/hourly_usage_200607.png
-rw-r--r-- 1 apache user4 3411 Jul 21 04:00 ./web/stats/daily_usage_200607.png
-rw-r--r-- 1 apache user4 33689 Jul 21 04:00 ./web/stats/webalizer.current
-rw-r--r-- 1 apache user4 41 Jul 21 04:00 ./web/stats/webalizer.hist
-rw-r--r-- 1 apache user4 105142 Jul 21 04:00 ./web/stats/usage_200607.html
-rw-rw-r-- 1 apache user4 125 Jul 27 04:00 ./web/stats/.htaccess
-rw-r--r-- 1 apache user4 3735 Jul 21 04:00 ./web/stats/index.html
-rw-r--r-- 1 apache user4 2178 Jul 21 04:00 ./web/stats/ctry_usage_200607.png
-rw-r--r-- 1 apache user4 2217 Jul 21 04:00 ./web/stats/usage.png
-rw-r--r-- 1 apache user4 12288 Jul 27 04:00 ./web/stats/dns_cache.db
===