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


Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to