December 13, 2017, 06:45:07 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Script using find command  (Read 1996 times)

Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
Script using find command
« on: November 26, 2006, 12:37:14 PM »
Hi all,

Sorry to come this forum after a long time, but really i was very busy in my project activities.



I am trying to write a script bash which display the files in dir and its subdir between particular dates.

like i want user to give input as two dates like 20061123 and 20061128, and now my script will search the files between these two dates and

i tried to make this  using find command which display the fileswhich is newer then particular date but strucked up how to find the files older then a particular date

Logic behind this  is My script find the files newer then particular date and older then some date ..then store this output in a particular file and take out common entries


Any help is appriciated...................
 
Thanks

Gaurav

Offline lugoteehalt

  • Linux Noob !
  • *
  • Posts: 22
    • BestiaryOfThePit
Re: Script using find command
« Reply #1 on: December 13, 2007, 04:36:51 PM »
This finds files last looked at between 2 and 6 minutes ago:  find /dir -amin +2 -amin -6Full description of time searching with find:  http://www.gnu.org/software/findutils/manual/html_mono/find.html#Time.  Hope some help. :)
« Last Edit: December 13, 2007, 04:40:45 PM by lugoteehalt »

Offline dragoncity99

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 551
Re: Script using find command
« Reply #2 on: December 15, 2007, 03:02:04 AM »
Owez read the man page dude :)

# man find