Linux 1 Chapter 3 Questions
When issuing the ls -F command, what special character indicates a linked file? a. @ b. * c. & d. =
@
Select the command that can be used to provide a long listing for each file in a directory: a. ls -T b. ls -L c. ls -F d. ls -I
ls -I
When using the vi text editor, which of the following keys, when in command mode, will change to insert mode and place the cursor at the end of the current line? a. i b. a c. I d. A
A
When using the vi text editor, which of the following keys, when in command mode, will move to the last line in the document? a. G b. L c. P d. W
G
If enough unique letters of a directory name have been typed, what key can be pressed to activate the BASH shell's completion feature? a. Alt b. Tab c. Ctrl d. Esc
Tab
In order to move from the /home/joe/test/data to the /home/joe directory, what command should be issued? a. cd .. b. cd ../.. c. /home/joe d. cd ./..
cd ../..
Kate wants to compare two text files to identify what might have been changed from one version to another. Which of the following commands can she use to do this? a. match document1.txt document2.txt b. version --compare document1.txt document2.txt c. compare document1.txt document2.txt d. diff document1.txt document2.txt
diff document1.txt document2.txt
Garrett wants to search through a csv file to find all rows that have either the name John or Bob in them and display them out to the terminal. Which of the following commands could Garrett use to perform this search? a. grep -E "(John|Bob)" salesemployees.csv b. grep (John|Bob) salesemployees.csv c. grep -E (John|Bob) salesemployees.csv d. egrep (John|Bob) salesemployees.csv
egrep (John|Bob) salesemployees.csv
Mike has changed directory into one subdirectory after the next and has lost track of where he's at in the directory tree. Which of the following commands can he use to tell him the full path to the current subdirectory he is in? a. cd - b. pwd c. cwd d. ls -dir
pwd
What command can be issued to confirm which directory you are in at a command line prompt? a. dir b. pwd c. whereami d. ld
pwd