1 |
I used to use this for moving old mail to an archive folder. Just change the directories, and you should be golden. |
2 |
alias archive='find ~/.maildir/inbox/cur -mtime +30 -exec mv {} ~/.maildir/inbox/archive/cur/. \;' |
3 |
|
4 |
Dave |
5 |
|
6 |
On Thu, 28 Sep 2006 09:24:25 -0700 |
7 |
darren kirby <bulliver@×××××××××××.org> wrote: |
8 |
|
9 |
> quoth the maxim wexler: |
10 |
> > Hi group, |
11 |
> > |
12 |
> > I'd like to be able to cp or mv certain files from a |
13 |
> > dir according to their timestamp. |
14 |
> |
15 |
> Have a look at find. You can whip up a one-liner using the -atime, -mtime |
16 |
> or -ctime tests (depending on your intent) and use -exec to do the cp or |
17 |
> mv... |
18 |
> |
19 |
> > -Maxim |
20 |
> |
21 |
> -d |
22 |
> -- |
23 |
> darren kirby :: Part of the problem since 1976 :: http://badcomputer.org |
24 |
> "...the number of UNIX installations has grown to 10, with more expected..." |
25 |
> - Dennis Ritchie and Ken Thompson, June 1972 |
26 |
> -- |
27 |
> gentoo-user@g.o mailing list |
28 |
> |
29 |
|
30 |
|
31 |
-- |
32 |
<Omnic> another .sig addition |