I'm trying to do some cleanup similar to this question. In a UNIX OS, I want to delete the directories that aren't being symbolic linked to in a given directory.
e.g. I have a deployment script that creates a directory structure for an app like this:
1.0-201103071711/ 1.0-201103071718/ 1.0-201103071729/ current -> /opt/myapps/fooapp/1.0-201103071729/
I want to create a script that will remove the directories in that directory that aren't the "current" directory. Thanks!