Ch 7 Linux Utilities Quiz Flashcards
Use this command to display only unique lines in a file. Enter only the command without any arguments.
uniq
Use this command to display the first 10 lines of a text file. Enter only the name of the command, without any command arguments.
head
You want to remane a file named file1 to file2. Select the command.
a) rename file1 file2
b) rename file2 file1
c) mv file2 file1
d) mv file1 file2
d) mv file1 file2
Use this command to list directory contents. Enter only the command without any arguments. For example, name of the command was hello, enter hello.
ls
Use this command to display the last 10 lines of a text file. Enter only the name of the command, without any arguments.
tail
When using the Linux shelll, select the ONE item below that is an error.
a) echo hello world
b) ECHO HELLO WORLD
c) echo HELLO WORLD
e) echo “hello world”
b) ECHO HELLO WORLD
Use this command to remove a fiile. Enter only the name of the command, without any arguments.
rm
You need to determine the file type of a file named hello. Select the command.
a) file hello
b) which hello
c) type hello
d) filetype hello
a) file hello
Use this command to concatenate files. Enter only the name of the command, without any command-line arguments.
cat
Use this command to display the current date/time on your Linux system. Enter only the command.
date
Use this character to pipe the output of one command to the input of another command.
a) *
b) |
c) /
d) =
b) |
Use this command to print the currentn working directory. Enter only the name of the command, without any arguments.
pwd
Use this command to sort lines of text files. Enter only the name of the command, without any command arguments.
sort
Use this command to dispaly your hostname. Enter only the command, without any comand-line arguments.
hostname
Select ALL the items that are TRUE as related to the grep command.
a) The grep command comes from the terms “Global, Regular Expression, Print”.
b) Use grep to display lines matching a pattern.
c) None of the answers listed are true.
d) The grep command is used for group express printing.
a) The grep command comes from the terms “Global, Regular Expression, Print”.
b) Use grep to display lines matching a pattern.