[NCLUG] shell scripting

Michael Dwyer mdwyer at sixthdimension.com
Thu Sep 13 11:23:49 MDT 2001


>   i have what i believe is a simple shell scripting question. i have a
> number of files in a directory. some of them have been modified today.
i
> want to copy the files that have been modified today to another
directory.
>
> something like
>
>  for ($i in <modified today>) cp $i /some/directory

I think find(1) is what you are looking for.  I'm not all that
familiar with find, but the man page is pretty good.  You'll
probably want something like this:

cp ` find -moddate TODAY ` /some/directory
   ^----  Backticks  ----^






More information about the NCLUG mailing list