Class 6 Quiz Flashcards
If you saw the following prompt, what user was logged into the machine?
it244gh@vm75:/courses/it244/f14/ghoffman$
it244gh
If you saw the following prompt, what was the hostname of the machine?
it244gh@vm75:/courses/it244/f14/ghoffman$
vm75
If you saw the following prompt, what was the absolute pathname of the current directory?
it244gh@vm75:/courses/it244/f14/ghoffman$
/courses/it244/f14/ghoffman
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
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
What command would you use to find the date and time?
date
What program would you use to find where the program file for tar is located?
which or whereis
What would you type at the command line if you wanted to find all files with “link” as part of their name?
locate link
What command would you use to find out all the users currently logged on to the machine you are using?
finger or who
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