Gentoo Archives: gentoo-user

From: Trey Gruel <drathos@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] date-specific cp/mv
Date: Thu, 28 Sep 2006 16:34:46
Message-Id: 3126779c0609280927l12eccf6cxe131253c05293c8c@mail.gmail.com
In Reply to: [gentoo-user] date-specific cp/mv by maxim wexler
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