User Tools

Site Tools


wiki:exercises160823

FURTHER EXERCISES 160823

Exercise1

Figure out what these do by executing them and seeing what happens:

$cd ~
$cd - 

Exercise2

How would you move up two levels in one command? For example, if I am in the directory /Users/erin/Documents/Photos/Selfies/
I can move to
/Users/erin/Documents/Photos
by typing
$cd ..

Can you find TWO ways to move from
/Users/erin/Documents/Photos/Selfies/
to
/Users/erin/Documents/
by executing cd just once? One way should use an absolute path and the other should use a relative path.

Exercise3

Say, I have several directories within my Photos directory: /Users/erin/Documents/Photos/Instagram/ /Users/erin/Documents/Photos/NikonPics/
/Users/erin/Documents/Photos/PanoShots/
/Users/erin/Documents/Photos/Selfies/

How move from within the Selfies folder to the Instagram folder using one cd command that uses a relative path?

Exercise4

Up to this point, we have used ls without any arguments. However, ls can take an argument. See what happens when you give ls the following types of arguments:

  1. a directory specified by a relative path
  2. a directory specified by an absolute path
  3. a file

Challenge Exercise5

What do you think the difference is between these…
/Users/erinnishimura/Documents/
and
/Users/erinnishimura/Documents
?

wiki/exercises160823.txt · Last modified: 2016/08/22 12:05 by erin