# touch -m 02260000 /tmp/file1
# touch -m -t 02262359.59 /tmp/file2
# find <dir> -newer /tmp/file1 ! -newer /tmp/file2 -ls
Other options would be to...
1) Write a small script in perl. This would potentially allow you to
parse the date you give to it, and would not require temporary files.
2) Parse the find output of all files for the date. Something like...
# find <dir> -ls | grep "26 Feb"
--
Unix System Administrator Taos - The SysAdmin Company
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
#!/bin/ksh
integer date=$(date +%j)
integer target_date=$(date -d "${1:-today}" +%j)
exec find -daystart -mtime $((date-target_date))
This takes a suitably quoted target date (e.g. '26 Feb') as its only
argument. You'll need to modify it to handle previous years' dates, or
further options, tests, etc. for find. Of course, if you can work out the
difference yourself, you can just type:
find -daystart -mtime 44 (or whatever)
HTH
Matt M
You might want to check the find ./ -m <days>... command also. It allows youQuote:> How do I use "find" to print out filenames (including paths) of files with
a
> date I specify? e.g. I want to show all files on my server that have a
date
> of "26 Feb".
1. Usind 'find' command to find certain text within a file
find /etc -type f -exec grep -l 'computer' {} \;
will find every file under /etc which has the word computer in it and
display the filename.
2. Problem with nVidia drivers...
3. "find" command to find file on specific date?
4. Modprobe error how to fix it ?
5. passwd dumping core after shadow password install
7. Need to find vi command to remove ^H from command man find > find.txt
8. grep + find: how to find files which have certain strings
9. find all files with certain date
10. HELP! Find files w/ certain date/time
11. HELP! Find files w/ certain date-time