Backend development with Express
  • Welcome!
  • Intro to backend development with Express
    • Tutorial
      • Getting started
      • Step 1: Setting up your project
      • Step 2: Installing Express
      • Step 3: Building the server
      • Step 4: Communicating with the server
      • Step 5: Routing
      • Step 6: Serving static files
      • Step 7: Sending your blog post to your server
      • Step 8: Extracting the blog post
      • Step 9: Saving your blog post
      • Step 10: Displaying your blog posts
      • Congratulations!
    • Extras
      • More ideas
      • Individual Blog Posts
    • Keywords
    • Command-line cheatsheet
Powered by GitBook
On this page
  • Which folder am I in?
  • See what's in a folder
  • Go inside a different folder
  1. Intro to backend development with Express

Command-line cheatsheet

Quick list of the most common commands you'll need for the tutorial.

Which folder am I in?

You can use the command line to move through folders on your computer, just like with Finder on a Mac or File Explorer on Windows.

To see your location in your computer's file system, use the pwd (Print Working Directory) command:

$ pwd

See what's in a folder

You can get a list of all the files in your current location, using the ls (list) command.

$ ls

Pro tip: anything in the list that is followed by a forward slash is a folder, e.g. Desktop/

You can even look at what's inside other folders. Let's say you're currently inside Desktop/ and you want to see what's inside Desktop/pics/, you can do this:

$ ls pics/

Go inside a different folder

If you want to go from Desktop/ to Desktop/pics/, use the cd (Change Directory) command.

cd pics/

Go back up to the parent folder

If you decide you've had enough of pics/ and want to go back up the chain to Desktop/ you need to do something slightly different.

Desktop/ is one folder up, so you need to do this:

cd ..

The .. means the parent folder, i.e. the folder that the current folder lives inside.

PreviousKeywords

Last updated 5 years ago