I attempted to set up Apache Ant on my small Mac and that i adopted the following steps :

  1. I downloaded apache-ant-1.8.1-bin.tar.gz into my Downloads folder.
  2. I moved the file to /usr/local/ by using this instructions : sudo sh and mv apache-ant-1.8.1-bin.tar.gz /usr/local/

Now I wish to use cd /usr/local/ but it is no longer working, I recieve back "No such file or directory".

I Quickly used cd /usr/ and ls instructions also it appears the local folder can there be. Basically attempt to can get on I recieve exactly the same error.

Since I Have already used sudo su why I can not can get on? Any ideas?

Ant has already been placed on Mac OS X, and thus there is no need to set up it yourself. Should you absolutely wish to do the installation, though, the easiest way is always to do the installation through MacPorts (using sudo port install apache-ant), however, to set up it by hand, you should:

  1. Decompress the .tar.gz file (why have you move it before untarring it?)
  2. Optionally place it somewhere.
  3. Place the "bin" subdirectory inside your path.

The instructions that you'd need, presuming apache-ant-1.8.1-bin.tar.gz remained as inside your Downloads directory, will be the following (explanatory comments incorporated):

ant --version # Demonstrate builtin version
cd ~/Downloads # Let's get into your downloads folder.
tar -xvzf apache-ant-1.8.1-bin.tar.gz # Extract the folder
sudo mkdir -p /usr/local # Ensure that /usr/local exists
sudo cp -rf apache-ant-1.8.1-bin /usr/local/apache-ant # Copy it into /usr/local
# Add the new version of Ant to current terminal session
export PATH=/usr/local/apache-ant/bin:"$PATH"
# Add the new version of Ant to future terminal sessions
echo 'export PATH=/usr/local/apache-ant/bin:"$PATH"' >> ~/.profile
# Demonstrate new version of ant
ant --version

Do that:

sudo port install apache-ant