The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
script to find the average number or files? bbbngowc Shell Programming and Scripting 2 03-27-2008 08:57 AM
how to find the number of files harish409 UNIX for Dummies Questions & Answers 5 10-09-2007 06:09 AM
Script to move certain number of files every 10 minutes. amitsayshii UNIX for Dummies Questions & Answers 1 02-26-2007 12:55 AM
simple script to find the number of "tab"s...but,... sekar sundaram Shell Programming and Scripting 0 12-14-2005 02:58 AM
shell script to find files naren_samba2005 Shell Programming and Scripting 2 10-21-2005 02:06 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-31-2006
Registered User
 

Join Date: Mar 2006
Posts: 13
awk script to find the number of files

awk script to find the number of files in a directory with their date less than 15-oct-2006

please help
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-31-2006
tayyabq8's Avatar
UNIX Hobbyist
 

Join Date: Nov 2004
Location: /World/Asia/MiddleEast/Kuwait/Salmiya
Posts: 513
Why you want to use awk only? Any technical reason.?
Reply With Quote
  #3 (permalink)  
Old 10-31-2006
Registered User
 

Join Date: Mar 2006
Posts: 13
no technical reason as such.
even a awk command on the prompt line would do
Reply With Quote
  #4 (permalink)  
Old 10-31-2006
tayyabq8's Avatar
UNIX Hobbyist
 

Join Date: Nov 2004
Location: /World/Asia/MiddleEast/Kuwait/Salmiya
Posts: 513
Why you don't you use find, like this:
Code:
#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
Reply With Quote
  #5 (permalink)  
Old 10-31-2006
Registered User
 

Join Date: Aug 2006
Posts: 22
Ajay,

Have you explored 'find' command with '-ctime' or '-mtime' option?
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:50 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0