Module 3 Flashcards
Which line will be displayed with the following command?
$ grep “^I” file1
- I went to
- How I wished
- Jack and I
- 208-496-1100
I went to
Find the match.
- Home directory
- Current directory
- Parent directory
- The root directory
Home directory ~
Current directory .
Parent directory ..
The root directory /
Identify the relative path names. (Select two)
- ../../bin
- /bin
- Download
- /root
../../bin
Download
Which command was entered at ____________________? (Select two)
[user1@localhost gdm]$ pwd
/etc/gdm
[user1@localhost gdm]$ ____________________
[user1@localhost share]$ pwd
/usr/share
- cd ../../root/usr/share
- cd ../../usr/share
- cd ../usr/share
- cd /usr/share
cd ../../usr/share
cd /usr/share
Which statement describes the regular expressions? (Select two)
- Interpreted by the shell
- Interpreted by text tool programs such as grep
- Finds matches within text files
- Finds matches in filenames
Interpreted by text tool programs such as grep
Finds matches within text files
Which statement is true for the regular expression metacharacter ‘?’ ?
- Matches 0 or more occurrences of the previous character
- Matches 0 or 1 occurrences of the previous character
- Matches 1 or more occurrences of the previous character
- Matches 1 occurrences of the previous character
Matches 0 or 1 occurrences of the previous character
What command was given for the following output?
[root@localhost dev]# __________
tty6 tty60 tty61 tty62 tty63
- ls tty6?
- ls tty6*
- ls tty6[0-3]
- ls tty6[0123]
ls tty6*
Which command is NOT used to display the content of a text file?
- cat
- dog
- head
- tail
dog
Which command was given for the output below?
ls -a
Which one is NOT a popular text editor on Linux?
- vi
- Emacs
- Python
- nano
Python
Which command would a user type on the command line to find out the current directory in the directory tree?
- pd
- cd
- where
- pwd
pwd
A user typed in the command pwd and saw the output: /home/jim/sales/pending. How could that user navigate to the /home/jim directory?
- cd ..
- cd /jim
- cd ../..
- cd ./.
cd ../..
Linux has only one root directory per directory tree.
- True
- False
True
The less command offers less functionality than the more command.
- True
- False
False
A user types the command head /poems/mary. What will be displayed on the terminal screen?
- the first line of the file mary
- the header for the file mary
- the first 20 lines of the file mary
- the last 10 lines of the file mary
- the first 10 lines of the file mary
the first 10 lines of the file mary