Coder Social home page Coder Social logo

command-line-lab's Introduction

Command line lab

Introduction

Developing web apps requires a degree of comfort navigating and interacting with your operating system through the command line, and similar to how you'll be practicing writing and running Ruby and JavaScript later in the course, we'll be practicing creating, modifying, and moving files and folders in your terminal to get you practicing Unix commands.

For this lab, you're going to create files and folders to organize your favorite books, movies, and music - then, you're going to reorganize them.

Be sure to use the cheatsheets in the "Additional Resources" section at the bottom of this page in case you get stuck.

Note: The specific authors, bands and names here are just examples -- use your own favorites! Seriously!

Exercise

Requirements

  • From your WDI working directory, create a folder called "my-favorite-things"; you'll use that folder to do the exercises below

  • Organize your favorite books

    • in the "my-favorite-things" folder, create a folder called "books"
    • create a folder in books named after your favorite author (e.g. "mark-twain", or "john-grisham", but avoid spaces!)
    • create files named after some of the author's books in the author's folder
    • open the books folder in atom/sublime
    • edit each file to put a brief description of the book
  • Organize your favorite movies

    • in the "my-favorite-things" folder, create a folder called "movies"
    • create a folder in movies named after your favorite actor
    • create a folder in the actor folder named after the actor's breakthrough movie
    • create a text file named after the actor's character in the breakthrough movie in the top level "movies" directory
    • move the text file to the breakthrough movie's folder
    • look back at Sublime/Atom and edit that text file with a description of the character's role in the movie
  • Organize your favorite music

    • in the my-favorite-things folder, create a folder called "music"
    • move into the "music folder"
    • create a folder called "disco"
    • create a text file in "disco" called "ymca"
    • delete the "disco" folder
    • create a folder called "creed"
    • delete the "creed" folder
    • create folders called "one-direction", "the-strokes", and "rihanna"
    • create a text file in "one-direction" called "what-makes-you-beautiful.txt"
    • make two copies "what-makes-you-beautiful.txt" - one into "the-strokes" and one into "rihanna" and rename those files with songs by those artists
  • Reorganize everything

    • in the my-favorite-things folder, create a folder called "media"
    • move "books", "movies", and "music" into the "media" folder
  • Organize the top music, movies, and books of 2015

    • move to the my-favorite-things folder and copy the "media" folder, then, rename it "2015-media"
    • in the 2015-media folder, rename each folder to have "2015-" before the title
    • delete the contents of "2015-music", "2015-movies", and "2015-books"
    • create a file called "top-ten-movies.html" in "2015-movies"
    • create a file called "top-ten-songs.html" in "2015-music"
    • create a file called "top-ten-books.html" in "2015-books"
    • create an ordered list - using HTML! - of the top 10 movies, songs, and books in each of the appropriate files

Bonus

  • Look through the additional resources and do the following

    • look at the top/bottom 10 lines of each file
    • figure out how search through a file from the command line - without opening the file - for a string of text
    • explore some more bash in their docs

Starter code

No starter code needed for this lab!

Deliverable

Add your my-favorite-things directory to your own fork of this repo and push it to your fork! Like so:

  • Click 'Fork' on this github page. You will be redirected to your fork
  • Clone the repo to your local machine by copying the url to the repo, and..
  • enter git clone https://github.com/YourUser/THE-REPO-NAME.git (only with the real repo name and username)
  • Make your changes
  • git add -A
  • git commit -m "some commit message"
  • git push origin master

You can open up your "my-favorite-things" directory in Sublime/Atom, to track your progress.

Here's a look at what your files/folders should look like after each big step in the exercise:

  • After "Organize your favorite books":

  • After "Organize your favorite movies":

  • After "Organize your favorite music":

  • After "Reorganize everything"

  • After "Organize the top music, movies, and books of 2015"

Additional Resources

Licensing

All content is licensed under a CC­BY­NC­SA 4.0 license. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact [email protected].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.