Skip to content

Instantly share code, notes, and snippets.

@rapala61
Last active March 13, 2016 16:37
Show Gist options
  • Save rapala61/189e936837c4e3d9f2fb to your computer and use it in GitHub Desktop.
Save rapala61/189e936837c4e3d9f2fb to your computer and use it in GitHub Desktop.

Command Line Interface - (20m)

Introduction

You are going to build a few homes and move stuff around a bit using the Command Line.

Exercise

Navigate to your desktop and create a folder named cli_lab

Change directory to the newly created cli_lab. We are going to work from inside this folder.

Use the command line to implement each step. The outcome of each step should look like the given folder structures:

1- Create the following file structure

home
  |-room
  |   |-bed.txt
  |   |-chair.txt
  |   |-tv.txt
  |   |-closet
  |       |-shirt.txt
  |       |-shoes.txt
  |-bathroom

2- Create a new home 'new_home' next to 'home'

home
  |-room
  |   |-bed.txt
  |   |-chair.txt
  |   |-tv.txt
  |   |-closet
  |       |-shirt.txt
  |       |-shoes.txt
  |-bathroom
  |
  |
new_home
  |-room
  |-bathroom
  |-kitchen

3- Move the contents from 'home' to 'new_home'. Note: The 'new_home' doesn't have a closet!

home
  |
new_home
  |-room
  |   |-bed.txt
  |   |-chair.txt
  |   |-tv.txt
  |   |-shirt.txt
  |   |-shoes.txt
  |-bathroom
  |-kitchen

4- Add a pantry to the kitchen and add sugar.txt and cinnamon.txt in it.

home
  |
new_home
  |-room
  |   |-bed.txt
  |   |-chair.txt
  |   |-tv.txt
  |   |-shirt.txt
  |   |-shoes.txt
  |-bathroom
  |-kitchen
  |   |-pantry
  |       |-sugar.txt
  |       |-cinnamon.txt

5- demolish 'home' and rename 'new_home' to 'home'

Requirements

  • Save each command used for each step.

Deliverable

  • Use Slack to send me a private message with the list of the commands you used in the lab.

Additional Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment