<html>
A better way:<br><br>
find . -type f -mtime n -exec cp {} /destination_dir \;<br><br>
The -type f will make sure you don't try and copy a directory.<br>
Its always safe to do this first to make sure it is getting the files you
expect<br><br>
find . -type f -mtime n -print<br>
-------------------------------------------------------------------------------------<br><br>
I would simply use the "find" command.<br><br>
find . -mtime n -exec cp {} /destination_dir \;<br><br>
mtime is for modified time and n is true if the file has been modified in
n days.<br><br>
Hope this helps. <br><br>
At 11:09 AM 9/13/01 -0600, you wrote:<br>
<blockquote type=cite class=cite cite>hey folks,<br><br>
  hope everyone and all your loved ones are well.<br><br>
  i have what i believe is a simple shell scripting question. i have
a<br>
number of files in a directory. some of them have been modified today.
i<br>
want to copy the files that have been modified today to another
directory.<br><br>
something like<br><br>
 for ($i in <modified today>) cp $i /some/directory<br><br>
i am using bash.<br><br>
thanks,<br>
mike<br><br>
-- mike cullerton   michaelc@cullerton.com<br><br>
<br>
_______________________________________________<br>
NCLUG mailing list<br>
NCLUG@nclug.org<br>
<a href="http://www.nclug.org/mailman/listinfo/nclug" eudora="autourl">http://www.nclug.org/mailman/listinfo/nclug</a></blockquote>
<x-sigsep><p></x-sigsep>
<font face="Courier New, Courier">C. J.
Keist                    
Email: cjay@engr.colostate.edu<br>
UNIX/Network
Manager           
Phone: 970-491-0630<br>
Engineering Network Services    Fax:  
970-491-5569<br>
College of Engineering, CSU<br>
Ft. Collins, CO 80523-1301<br><br>
</font></html>