Calculate Files Created Today | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


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

Calculate Files Created Today

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-29-2009
xgringo xgringo is offline
Registered User
 
Join Date: Dec 2006
Last Activity: 17 February 2014, 4:23 PM EST
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Calculate Files Created Today

I need to figure out how to get all the files from a certian dir ./123/*sat files
and ./230/*sat files and several other directories which have these *sat files in them. I need to calculate how many were created today and how many yesterday from 2:00 pm on the 28th to 2pm on the 29th.

It's a solaris box 5.8 sun4us sparc FJSV,GPUZC-M

Help
Sponsored Links
    #2  
Old 09-29-2009
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 16 April 2014, 9:24 PM EDT
Location: NM
Posts: 10,056
Thanks: 250
Thanked 756 Times in 711 Posts

Code:
touch -t 200909280200  dummy1
touch -t 200909290200  dummy2
find ./dir1  \( -newer dummy1 -a ! -newer dummy2 \)  -name '*sat'  | wc -l |read dir1cnt
find ./dir2  \( -newer dummy1 -a ! -newer dummy2 \)  -name '*sat'  | wc -l |read dir2cnt
echo "dir1cnt = $dir1cnt dir2cnt = $dir2cnt"

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Calculate 30/31 days from today date script coolgoose85 Shell Programming and Scripting 3 07-09-2009 09:59 AM
FTP the files which were modified today Kalvinder Shell Programming and Scripting 9 02-06-2009 11:35 AM
Files with 0 file size and created today rushs682 Shell Programming and Scripting 7 11-21-2008 04:05 PM
To list all the files created today with directory path meetusha.b UNIX for Dummies Questions & Answers 4 08-18-2008 05:53 AM
Sort files by date, not showing files from today carlosdivega UNIX for Dummies Questions & Answers 3 07-17-2008 10:37 AM



All times are GMT -4. The time now is 02:43 AM.