awk script to find the number of files in a directory with their date less than 15-oct-2006
please help
awk script to find the number of files in a directory with their date less than 15-oct-2006
please help
Why you want to use awk only? Any technical reason.?
no technical reason as such.
even a awk command on the prompt line would do
Why you don't you use find, like this:
#Create a file with a datestamp of 15 Oct, 2006 first
touch -t 200610150000.00 test
#Find the files newer than 'test' and redirect the output to test1 file
find . -type f -newer test -print > test1
#Count the number of lines in 'test1' file, this is what you want
wc -l test1
Ajay,
Have you explored 'find' command with '-ctime' or '-mtime' option?