User Tools

Site Tools


assignments:2018assignment1

This is an old revision of the document!


Assignment 1

Due August 28, 2018

Compile your answers in a .txt document

Turn your answers by uploading your .txt document to CANVAS

Question1

Explain what these two commands do by executing them and seeing what happens:

$cd ~
$cd - 

Question2

The grandparent directory: Can you find TWO ways to move into the grandparent directory in a single command? That is, how can you move from
/Users/erin/Documents/Photos/Selfies/
to
/Users/erin/Documents/
by executing cd just once? Find TWO ways to do this. One way should use an absolute path and the other should use a relative path.

Question3

If I have several directories within my Photos directory, like so: /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. What happens when you give ls the following types of arguments?:

  1. a directory
  2. a file

Question5

Say you have accidentally named a directory with spaces in the name Files for Qualifying Exam You try to list the contents of this directory by executing the following command?

$ls Files for Qualifying Exam

However, this doesn't work as expected.

1. Why doesn't this work? What is the computer trying to do?  
2. What is the proper command to list the contents of this directory?  

Fun Stuff

This is just for fun and is not due…

Challenge Question

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

Terminus

assignments/2018assignment1.1534849447.txt.gz · Last modified: 2018/08/21 05:04 by erin