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 09: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 01:55 AM
simple script to find the number of "tab"s...but,... sekar sundaram Shell Programming and Scripting 0 12-14-2005 03:58 AM
shell script to find files naren_samba2005 Shell Programming and Scripting 2 10-21-2005 02:06 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
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  
Old 10-31-2006
tayyabq8's Avatar
Moderator
 

Join Date: Nov 2004
Location: Bahrain
Posts: 555
Why you want to use awk only? Any technical reason.?
Reply With Quote
  #3  
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  
Old 10-31-2006
tayyabq8's Avatar
Moderator
 

Join Date: Nov 2004
Location: Bahrain
Posts: 555
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  
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 The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:02 PM.


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

Content Relevant URLs by vBSEO 3.2.0