cleaning up

Jeremy Lavergne jeremy at
Mon Jan 11 15:55:49 PST 2010

> find -E $prefix  -regex .*.mp_[0-9]* -exec rm -f {} \;

No worse than what I had suggested, but feels like it has a lot more overhead for no reason.

> I'd rather not remove directories so I replace rm -rf with rm -f.

Why not avoid directories all together and use -type f in find?

> 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}.

Likely they are all the same size.

> 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.

Well, the best way to be clean up anytime you do a force activate.  Having a naming scheme overlap isn't exactly MacPorts' fault.  You could name your db /opt/local/bin/port for we know.

> 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.

Don't name anything with mp in it?  Backup?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2435 bytes
Desc: not available
URL: <>

More information about the macports-dev mailing list