OOPortal OOPortal


prev next
Structured Programming   «Prev  Next»
Exercise

Working from the command prompt

Create a directory (Unix)
Objective: Create a directory for your programs.
Scoring
This exercise is not scored. It's an opportunity for you to check your understanding of the material covered in the preceding lesson. When you're finished, click the Submit button to receive credit for having completed it.
Background/overview
Before you begin writing programs you need a place to keep your work. In this exercise you'll create a directory on your file system for just that purpose.
Instructions
  1. Open a shell window.
  2. Create a directory named progfun in your home directory. Here's how you would use the cd and mkdir commands to do this:
     
    cd
    mkdir progfun
    
     

  3. Use the cd command to change your current directory to the progfun directory created in the previous step. Here's an example:
     
    cd progfun
    
     

  4. Use the ls command to display the contents of progfun.