RSS Forums RSS
Please support our Shell Scripting advertiser: Programming Forums

searching for files

Join Date: Apr 2006
Posts: 4
Reputation: ranj@chn is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ranj@chn ranj@chn is offline Offline
Newbie Poster

Re: searching for files

  #3  
Apr 28th, 2006
Originally Posted by problems
i would like to find files that have been modified during a month. lets say i am type in 2004 06
it will find files in the month of june.
i know using l -la lista all the files and thier attrbutes. and one of thier attributtes is last modified time. can i somehow search for files using the modified time attrbute of the file

is there also a way to convert a numberic date to a textual date e.g. like
06 2006 to jun 2006

need help urgently

thanks



You can use 'case' function to name the month parameter like
LEts suppose inside the script
$1-06
$2 - 2006
case $1 in
01)) month="Jan" ; break;;
02)) month="Feb" ; break;;
.
.
.
.
.
and then grep for the 'month' and year variable from the ls output.
Reply With Quote  
All times are GMT -4. The time now is 9:22 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC