atime defines the last access time.
Seems you want that? But that is apparently not the same as the date you use in Finder.
ls -lu for the date
Mac OS X also uses the "HFS meta data" (or: "Finder info") to store dates. For example: Unix does not store file creation dates. The
cdate in Unix is really the change date (including, for example, changes in access permissions, so
cdate gets a new value in slightly different occasions than the modification date for
mdate). Using this metadata, Mac OS X can still keep the details.
There are several options to show (some of) those dates, like:
mdfind one can search for specific meta data. But it uses the Spotlight index, so I guess it might not find everything.
Like to find files that are excluded from Time Machine backups:
sudo mdfind "com_apple_backup_excludeItem = 'com.apple.backupd'"
To search based on the creation date, use
kMDItemFSCreationDate. For the last opened date:
kMDItemLastUsedDate. But note that files which have been created through certain Terminal commands, may not have that meta data set:
echo "Hello world" > ~/Desktop/hello-world.txt
mdfind -onlyin ~/Desktop 'kMDItemFSCreationDate >= $time.this_week'
After opening "will-not-be-found.txt" in Text Edit, you'll see the file after all.
See also the Spotlight Query Syntax.
awk -F - '"2011/03/25" < $1 && $1 <= "2011/04/04"' filename
or, if the dates are more dynamic
d1="2011/03/25" # or whatever commands to set this date
d2="2011/04/04" # or whatever commands to set this date
awk -v start=$d1 -v end=$d2 -F - 'start < $1 && $1 <= end' filename
The egrep pattern contains three parts. The first part grabs everything from 00:00:00 to 09:59:59. The second part grabs everything from 10:00:00 to 16:59:59, and the third part grabs 17:00:00.