IT 244: Introduction to Linux/Unix
Answers to Class 6 Ungraded Quiz

  1. If you saw the following prompt, what USER was logged into the machine?
    it244gh@vm75:/courses/it244/s19/ghoffman$
    it244gh
  2. If you saw the following prompt, what was the HOSTNAME of the machine?
    it244gh@vm75:/courses/it244/s19/ghoffman$
    vm75
  3. If you saw the following prompt, what is your CURRENT DIRECTORY?
    it244gh@vm75:/courses/it244/s19/ghoffman$
    /courses/it244/s19/ghoffman
  4. What would you type at the command line if your wanted to find all lines in the file red_sox.txt that had the word "Win", but NOT the word "Rays"?
    grep  Win  red_sox.txt  |  grep -v Rays
  5. What would you type at the command line if your wanted to find all lines in the file red_sox.txt that had the word "Win", but NOT the word "Rays", and have the lines sorted alphabetically?
    grep  Win  red_sox.txt  |  grep -v Rays  |  sort
  6. What command would you use to find the date and time?
    date
  7. What program would you use to find where the program file for tar is located?
    which or whereis
  8. What would you type at the command line if you wanted to find all files with "link" as part of their name?
    locate  link
  9. What command would you use to find out all the users currently logged on to the machine you are using?
    finger or who
  10. What would you type at the command line if you wanted to find out all you could about the user with account name wombat?
    finger wombat