[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sharding by Year.
From: |
Steffen Nurpmeso |
Subject: |
Re: Sharding by Year. |
Date: |
Mon, 07 Jun 2021 21:43:00 +0200 |
User-agent: |
s-nail v14.9.22-144-g3abf4ab524 |
Michael Richardson wrote in
<31957.1623081930@localhost>:
|Ralph Corderoy <ralph@inputplus.co.uk> wrote:
|>> outgoing/y2001 has 1287 messages (1-1287).
|>> outgoing/y2002 has 9335 messages (1-9335).
|>> outgoing/y2003 has 3909 messages (1-3909).
|
|> Out of interest, how did you pick what's in each year? Textually, with
|> ‘2002’ appearing in the Date field. Or as a year and if so was that
|> local time, the sender's time, or UTC? :-)
|
|Well, it's outgoing email, so it's all mine, so it's all in my time zone.
|
|On Jan. 1, I do:
| refile -src +outgoing all +outgoing/y2020
Damn, i just call a .rotate.sh asap, this year at 00:11:19.
Relevant part is
cd mail || exit 4
find . -maxdepth 1 -type f \
-not -name 'download' -not -name '*gmane*' \
-not -name '*.xz' -not -name '*.zst' \
-not -name '*.sh' -not -name .yearstamp |
while read f; do
f=`basename ${f}`
if echo ${f} | grep -E '^[1-9][0-9]{3}\.'; then
:
elif [ -s ${f} ]; then
echo "Rotating ${f} to ${YEAR}.${f}.zst"
zstd -T0 -19 -zc < ${f} > ${YEAR}.${f}.zst
chmod 0400 ${YEAR}.${f}.zst
: > ${f}
else
echo "${f} is an empty file, removing it"
rm ${f}
fi
done
echo $YEAR > .yearstamp
Of course sometimes threads cross the line. Thus..
|well, I often forget Jan. so, "all" might be adjusted having run "scan"
|
|It would be nice to be able to treat these folders a single folder for
|certain operations.
Oh i wish my MUA could do this yet. For many years in TODO:
The absolute sensation would be joinable operations over multiple
open mailboxes, e.g., views over multiple such!
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
- Very large folderTo:, norm, 2021/06/05
- Re: Very large folder, Ralph Corderoy, 2021/06/05
- Re: Very large folderTo:, George Michaelson, 2021/06/05
- Re: Very large folderTo:, Ralph Corderoy, 2021/06/06
- Re: Very large folderTo:, Michael Richardson, 2021/06/07
- Sharding by Year., Ralph Corderoy, 2021/06/07
- Re: Sharding by Year., Michael Richardson, 2021/06/07
- Re: Sharding by Year.,
Steffen Nurpmeso <=
- Re: Sharding by Year., Bakul Shah, 2021/06/07
- Re: Sharding by Year., Michael Richardson, 2021/06/08
- Re: Very large folderTo:, Conrad Hughes, 2021/06/07
- Re: Very large folderTo:, Ken Hornstein, 2021/06/07
- Re: Very large folderTo:, Michael Richardson, 2021/06/07
- Re: Very large folderTo:, Ken Hornstein, 2021/06/07
Re: Very large folderTo:, Ken Hornstein, 2021/06/05