Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I usually use the mamp server on my Mac, but yesterday I ran this script.



expand_dir () {
  pushd "$1" >/dev/null
  popd >/dev/null

expand_dir `dirname $0`


if [ -e "$WWW_BASE"/orbit ]; then
    echo 'Nothing to be done - linked already.'
    echo "Going to add link in $TARGET - 'sudo' may ask you for your password."

    ln -s "$DIR"/server/www/orbit $TARGET

    if [ $? -eq 0 ]; then
        echo 'Done.'
        echo 'Failed (not an admin user or failed to authenticate).'

read -n 1 -s -p 'Press any key to continue...'

How to undo this script I cant run my default server and all my aliases does not work any more?

share|improve this question
up vote 1 down vote accepted

This script could only create symbolic link /Library/WebServer/Documents/orbit which points to $DIR/server/www/orbit where $DIR (expand_dir function populates this variable) is a directory location of a script at the time of execution. By removing said link named /Library/WebServer/Documents/orbit you should undo the effects of the script.

share|improve this answer
thank you :) have to learn bash – Fincha Apr 3 '12 at 14:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.