The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 12:57 PM
how to find the number of files harish409 UNIX for Dummies Questions & Answers 5 10-09-2007 09:09 AM
Script to move certain number of files every 10 minutes. amitsayshii UNIX for Dummies Questions & Answers 1 02-26-2007 04:55 AM
simple script to find the number of "tab"s...but,... sekar sundaram Shell Programming and Scripting 0 12-14-2005 06:58 AM
shell script to find files naren_samba2005 Shell Programming and Scripting 2 10-21-2005 05:06 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-31-2006
uni_ajay_r uni_ajay_r is offline
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
  #2 (permalink)  
Old 10-31-2006
tayyabq8's Avatar
tayyabq8 tayyabq8 is offline Forum Advisor  
Moderator
  
 

Join Date: Nov 2004
Location: Bahrain
Posts: 578
Why you want to use awk only? Any technical reason.?
  #3 (permalink)  
Old 10-31-2006
uni_ajay_r uni_ajay_r is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 13
no technical reason as such.
even a awk command on the prompt line would do
  #4 (permalink)  
Old 10-31-2006
tayyabq8's Avatar
tayyabq8 tayyabq8 is offline Forum Advisor  
Moderator
  
 

Join Date: Nov 2004
Location: Bahrain
Posts: 578
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
  #5 (permalink)  
Old 10-31-2006
hnhegde hnhegde is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 22
Ajay,

Have you explored 'find' command with '-ctime' or '-mtime' option?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:37 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0