Java Reference
In-Depth Information
However you accomplish it, when I say “start at your Desktop” or just
cdDesktop
,
that's what you'll always need to do, whether it's from anywhere, like this:
$
cd Desktop
from your home directory first:
$
cd
$
cd Desktop
using a tilde for the home directory:
$
cd ~/Desktop
explicitly typing the name of your home directory:
$
cd /Users/andy/Desktop
or doing that with quotes because you have spaces in the name:
$
cd /Users/"John Smith"/Desktop
No matter what, it will always be shown here as just
$
cd Desktop
And Now for Some Fun
In this topic's downloaded code, in your
Desktop/code
directory, there's a special
subdirectory named
Adventure
. Using the command line,
cd
there and have a
look at those files and directories.
You can use
ls
to list the directories as we've done here. To take a quick look
at text files (named
.txt
), you can use the
cat
command.
Start at your Desktop (however that works for you, as described in the last
section).
$
cd Desktop
$
cd code
$
cd Adventure
$
cat README.txt
These are some files to make exploring the file system a little more fun.
Do an
ls
and see what else is there and explore a bit in the subdirectories.
See what treasures—and what dangers—you find.