1 |
On 9/28/06, maxim wexler <blissfix@×××××.com> wrote: |
2 |
> I'd like to be able to cp or mv certain files from a |
3 |
> dir according to their timestamp. |
4 |
> |
5 |
> man cp mentions the '--preserve' option but I don't |
6 |
> think that's what I need. |
7 |
> |
8 |
> Does somebody know of some sort of script or perl or |
9 |
> python pass that'll do it? |
10 |
|
11 |
something akin to: |
12 |
|
13 |
find <srcdir> -type f -mmin 5 -exec cp {} <destdir> \; |
14 |
|
15 |
will copy all files in srcdir that have been modified within 5 minutes |
16 |
to destdir. check the find man page for other ways of checking the |
17 |
files or restricting how far find will recurse, etc.. |
18 |
|
19 |
-- |
20 |
Trey |
21 |
-- |
22 |
gentoo-user@g.o mailing list |