cleaning up
Bradley Giesbrecht
brad at pixilla.com
Mon Jan 11 15:40:25 PST 2010
On Jan 11, 2010, at 2:28 PM, Jeremy Lavergne wrote:
>> When an install/upgrade of forced with -f port renames the existing
>> file appending and extension .mp_<numbers>, correct?
>
> Yup.
>
>> Is <number> a timestamp or something else?
>
> Yup.
>
>> Is there a port command for cleaning/deleting these files?
>
> Nope, try:
> find $prefix -name *.mp<number> -exec rm -rf {} \;
Thanks, this works.
Does this look safe?
find -E $prefix -regex .*.mp_[0-9]* -exec rm -f {} \;
I'd rather not remove directories so I replace rm -rf with rm -f.
The thing I don't like about this approach is what if I have a
database named mp_somedb or mp_somedb.mp_sometable in /opt/local/var/
db/mysql5/?
To be safer yet is the timestamp always x digits long? I'd rather use
[0-9]{10}.
I don't really think there is any safe way to do this. I'd like to see
port keep track of these renames in a registry.
I would really need to move all my data (apache, dovecot, postfix,
mysql ) outside /opt/local to feel safe with a "find . *.mp* rm"
approach.
// Brad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20100111/c8ffa838/attachment.html>
More information about the macports-dev
mailing list