[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How to find all files created on a specific date???



On Thu, 1 Feb 2001, Bret Hughes wrote:
> BTW I could not find a good way to determin the number of days between two dates
> using bash.  What would be a good way to do this?

  date -d '5 days ago'

will give you the date five days ago which is prettyu helpful. You
probably could do

  FIRST=`date -d "1 month ago" +"%j"`
  SECOND=`date +"%j"`
  echo "${SECOND} - ${FIRST}" | bc

thornton





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]