2

I would like to write a bash script (or just use a command in the CLI) to

  1. find all the instances within a given directory and its subdirectories for a given time period
  2. copy those files into a given directory that i could pass as an argument

I'm a newbie to bash scripting. I'm migrating from one plat to another, so any help would be appreciated, even a link.

1

1 Answer 1

2
find -newermt "mar 03, 2010 09:00" -not -newermt "mar 11, 2010" -exec cp {} destination \;
2
  • thanks a ton. i should add (for the archives) that it should be 'find . xxx' instead of without, since i wanted it to be recursive. very very much appreciated!
    – jml
    Nov 13, 2010 at 13:12
  • @jml: GNU find doesn't require an explicit start directory. It defaults to . and is recursive by default. Nov 13, 2010 at 15:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .