Basic Unix Command Line Quiz

8 Questions | Total Attempts: 4478

SettingsSettingsSettings
Please wait...
Unix Quizzes & Trivia

A command line is sometimes referred to as a command screen and it is an interface used to type commands directly to a computer using a keyboard and not the mouse. Take the test below and see how much you understand the Unix command line and its uses. All the best!


Questions and Answers
  • 1. 
    How do you get help about the command cp?
    • A. 

      Help cp

    • B. 

      Man cp

    • C. 

      Cp ?

  • 2. 
    How do you display a listing of file details such as date, size, and access permissions?
    • A. 

      List all

    • B. 

      Ls -full

    • C. 

      Ls -l

  • 3. 
    How do you rename a file from new to old?
    • A. 

      Mv new old

    • B. 

      Cp new old

    • C. 

      Rn new old

  • 4. 
    • A. 

      Type myfile.txt

    • B. 

      List myfile.txt

    • C. 

      Less myfile.txt

    • D. 

      Cat myfile.txt

  • 5. 
    How do you create a new directory called flower?
    • A. 

      Newdir flower

    • B. 

      Mkdir flower

    • C. 

      Crdir flower

  • 6. 
    • A. 

      Grep plasmodium *

    • B. 

      Find plasmodium -all

    • C. 

      Lookup plasmodium *

  • 7. 
    How do you print the first 15 lines of all files ending by .txt?
    • A. 

      Print 15 .txt

    • B. 

      Cat *.txt -length=15

    • C. 

      Head -15 *.txt

  • 8. 
    Change the current directory to /usr/local/bin.
    • A. 

      Mv /usr/local/bin

    • B. 

      Cd /usr/local/bin

    • C. 

      Setdir /usr/localbin