Mod 03 Exploring Linux Filesystems

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Which of the following are valid file types in Linux? (Choose all that apply.)

named pipes directories linked files special device files

Which of the following text editors is easy to use and favored by new Linux users as a result?

nano

Mike has changed his current directory several times and has lost track of his location in the directory tree. Which of the following commands can he use to tell him the full path to the current directory he is in?

pwd

Abdul wishes to view the contents of a binary data file in his home directory to learn more about what program was used to create it. Which of the following commands would allow Abdul to safely view the contents of this file?

strings

To display a text file in reverse order, what command should be used?

tac

What command can be used to display the last five lines of a text file?

tail -5

Select the regular expression metacharacter that matches 0 or more occurrences of the previous character.

*

At the vi command mode prompt, what key combination will force a quit from the vi editor without saving changes?

:q!

When issuing the ls -F command, what special character appended to the filename indicates that the file is a shortcut to another file?

@

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

Which of the following key combinations, commonly used in the vi editor command mode, displays current line statistics?

Ctrl+g

When using the vi text editor, which of the following keys, when in command mode, will move to the last line in the document?

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?

Tab

Which of the following information does the stat command display about a file? (Choose all that apply.)

The time a file was created The file size The last time a file was accessed The last time the contents of a file were modified

In order to move from the /home/joe/test/data directory to the /home/joe directory, what command should be issued?

cd ../..

Which of the following commands change the current directory using an absolute pathname? (Choose all that apply.)

cd / cd /etc

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?

diff document1.txt document2.txt

What command is most effective at identifying different types of files?

file

The current directory contains eight project files named project1.txt through project8.txt. Which of the following commands will display the file type for all project files in the current directory except for project2.txt and project7.txt?

file project[!27]*

Chase is trying to extract records for employees 423 through 428 out of a comma separated values file that starts with the employee number. Which of the following commands would accomplish this? (Choose all that apply.)

grep "^42[3-8]" employees.csv

Which of the following commands will display lines that start with Label in all .conf files in the /etc/selinux directory?

grep "^Label" /etc/selinux/*.conf

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?

grep -E "(John|Bob)" salesemployees.csv

Jo has received a text file that contains multiple instances of his name spelled correctly as well as multiple instances spelled as Joe. Which of the following commands would search a text file for any occurrences of either spelling and display them out to the terminal? (Choose three.)

grep -E "Joe?" document1.txt grep "Joe*" document1.txt grep -E "Joe*" document1.txt

Which of the following commands will not interpret regular expressions, which translates into faster results being returned? (Choose all that apply.)

grep -F fgrep

Which of the following will display a list of files and directories under the /bin directory? (Choose all that apply.)

ls -R /bin tree /bin

Wayne is using the command line and is in his home directory. Which of the following will display a list of all files and their sizes from his home directory? (Choose two.)

ls -al ~ ls -al /home/wayne

Select the command that can be used to provide a long listing for each file in a directory:

ls -l

What commands can be used to view a large text file interactively, page-by-page? (Choose all that apply.)

more less


Kaugnay na mga set ng pag-aaral

Fundamentals of Electricity - FINAL EXAM Study Guide

View Set

통계분석 4장 One-Sample T-Test

View Set

Communication and Customer Service in the Healthcare Office: Module 1: Introduction to Therapeutic Communication

View Set

Ch 1 Theories in Lifespan Development

View Set

house, senate, both, or neither?

View Set

Test 2: Obstructive Pulmonary Disease

View Set