UH NOT CHEATING

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Match the vi command on the left with the description of the cursor movement on the right.

Move the cursor up a line: k Move the cursor one space to the left: h Move the cursor one space to the right: l Move the cursor down a line: j

In which boot process stage is the root partition mounted?

OS kernel

Which component is responsible for loading and executing the initial process?

OS kernel

You have a system with more than one Linux operating system installed. During the system's bootup process, which component loads a splash screen, allowing you to choose which operating system you want to run?

The secondary boot loader

Which of the following is a valid metacharacter that can be used in the bash shell to escape or ignore the shell's special meaning for the character that immediately follows?

\

Which of the following commands can be used to combine the content of three files into a single text stream?

cat

You are installing Linux on an old computer with an old BIOS, and you are planning the partitions for the hard disk drive. Which of the following directories SHOULD exist in the first 1024 cylinders of the hard disk drive?

/boot

All users at your site are using the bash shell. You want to set a variable that will apply to every user and always have the same value. Which of the following shell configuration files should you place this variable in?

/etc/profile

A Linux user has an executable file named *ni* that can save a snapshot of network information with the date and time in a log file. The executable ni file is in the /root directory, and /root is the current working directory. Which of the following commands would run the executable file? (Select TWO)

/root/ni ./ni

Which of the following directories MUST remain on the same partition? (Select THREE).

/sbin /dev /lib

What is the full path to the directory that holds the man files on the system?

/usr/share/man

What is the correct order for the boot phases of a Linux computer?

1: BIOS 2:Bootloader 3:OS Kernal 4: system or init

Which of the following directories is the home directory for the root user account?

/root

You have a Linux system with 8 GB of RAM installed. You plan to use this system as a server. How much space should you plan to partition for the swap file?

8 GB

A directory intended to be used only by administrators keeps filling with files. Which of the following commands would you use to see only the names of the users saving files in the directory?

ls -l | cut -d " " -f5

Which command displays all the environment vairables defined in the shell?

printenv

The /home/gshant/smp directory is empty and needs to be removed. The current working directory is /home/gshant. What would you enter at the command prompt to remove the smp directory?

rmdir smp

Which sed flag or option allows you to exchange one string of characters for another string of characters in a file?

s

Which of the following utilities will substitute an existing string with a new string within a file?

sed

Which of the following sed commands replaces all the occurrences of the string foo with the string bar in myfile.txt?

sed -e 's/foo/bar/g' myfile.txt

A user, ljenkins, contacts the help desk about an error received while removing a file from their home directory. The user received the following error when trying to use the rm command to remove the file: [ljenkins@fileserver]$ rm report.txtrm: remove write-protected regular empty file 'myfile2.txt'? yrm: cannot remove 'myfile2.txt': Operation not permitted While troubleshooting the issue, you list files in directory to see if you can discover the issue: [ljenkins@fileserver]$ ls -altotal 4drwxr-xr-x. 2 ljenkins ljenkins 24 Feb 25 12:04 .drwx 15 ljenkins ljenkins 4096 Feb 25 11:04 ..-rw-rw-r--. 1 ljenkins ljenkins 346 Feb 25 11:32 report.txt When prompted to remove the write-protected file, ljenkins entered yes and received an "Operation not permitted" error message. As the help desk technician, you attempt to remove the file with root privilages and recive the same error message. You decide to view the file attributes and receive the following output: [helpdesk@fileserver]$ lsattr ----I----------- ./report.txt 1 Which of the following commands would resolve the problem and allow the file to be deleted?

sudo chattr -i report.txt && rm report.txt

You want to view the number of commands your bash shell is set to save by examing the current HISTSIZE environment variable. You don't want to have to scroll through all the environment variables. Which of the following commands is the BEST way to determine the current value of the HISTSIZE variable?

echo $HISTSIZE

You reacently used the *HOST=FS4* command. Which of the following commands should you use to change the HOST variable to a global variable that will be inherited by subsequent child shells and process?

export HOST

Tim, a technician, created a local variable named val and set it to 5000 at the bash promp. Tim wants to use the variable in a scrip. But when the script is executed, the value of val is not set to 5000. Which of the following commands would allow Tim to set a global variable that would be available to the script?

export val=5000

You need to find all files in the /home/gshant directory that are larger than 300K. You change your directory to /home/gshant. What would you enter at the command prompt to find these files?

find -size +300k

Which of the following commands finds all of the files on the system that have either blue or gold in their names?

find / -name '*blue*' -o -name '*gold*'

Which of the following commands finds files with the .txt extension in the /home/gshant directory?

find /home/gshant -name '*.txt'

Which if the following commands displays the user groups that dblair is a member of?

grep -e dblair /etc/group

Which of the following commands displays all the lines in the blue_and_gold file that do not contain the word 'Karen'?

grep -v Karen blue_and_gold

An application named ABCD is generating system errors when it starts. Which of the following commands searches the system message log file for these errors?

grep ABCD /var/log/messages

Which of the following commands displays all lines within the MTS file that have the word "world" within them?

grep world MTS

What commonly predefined alias is configured to run the ls -l command?

ll

At the command prompt, how would you enter a command that will print the line count, word count, and byte count respectively in the /home/gshant/servepath file?

wc -lwc /home/gshant/servepath

Which of the following commands creates a shortcut that can be used to run the *tail -f /var/log/messages* command?

*alias sysmesg="tail -f /var/log/messages"

What command would you enter while in vi command mode to find the term Sam?

/Sam

Which of the following directories MUST be part of the partition that holds the root (/) directory? (Select THREE).

/bin /proc /etc

Your company is running a critical business application. The executive team wants to unsure the server is available at all times, even in the event of a server failure. Which of the following server roles would be used to provide a failover server in the event of a system failure?

Clustering

Which of the following nano text editor features makes it easier for beginners to learn than the vi text editor?

Keyboard shortcuts are displayed at the bottom of the editor.

You are trying to pipe data from the cat command to another program, but the data output does not make sense. You believe that the system's locale is corrupting the output. To test your hypothesis, you decide to change a locale environment variable. Which of the following changed variable would MOST likely produce correct data?

LANG=C

Which of the following has a process ID (PID) of 1?

The initial process

Which of the following character sets is a variable length encoding standard of Unicode that uses one to four 8-bit bytes to support many languages and most commonly used on Linux?

UTF-8

Which of following commands displays information found in the second column of the tab delimited ~/smarts file?

cut -f2 ~/smarts

Which of the following commands would display this output? Frank said, "Linux is fun!"

echo Frank said, \"Linux is fun\!\"

You are searching the standard input for any line containing "JAMESTOWN" at the end of a line. Which egrep constructor should you enter at the command prompt?

egrep JAMESTOWN$

What would you enter at the command prompt to display a file's type?

file

Which of the following commands will merge two files based on identical fields of text?

join

Which of the following commands will display the attributes of a /boot/grub/grub.conf file?

lsattr /boot/grub/grub.conf

Which of the following partitions functions as virtual memory for a Linux system?

swap

You are working on a Linux system and need more information about the uname command. What would you enter at the command prompt to learn about the uname command syntax and options?

uname -h

After a user starts a bash session and the script in /etc/profile is applied, if all the following files exist, which will be run next?

~/.bash_profile

A friend sent you a shell script file that is 117 lines long. He says that he wants you to examine code on lines 82 through 87. What command would you enter while in vi Command Mode to go directly to line 82?

#82

During installation, you need to make sure there is plenty of hard disk space allocated to the partition that is going to hold the entire Linux operating system. Which of the following is the BEST mount point for this partition?

/

Which of the following paths represents the root directory?

/

What is the full path to the directory that contains user data for all standard users on the system?

/home

You are in the process of manually creating the partitions during a Linux installation. Knowing that users will often require a lot of space to store their files, which of the following directories (or mount points) SHOULD be configured on its own partition?

/home

Most Linux distributions propose to create the root (/) and swap partitions by default. To prevent user files and system log files from filling up the / partition, which additional partitions are you MOST strongly advised to create? (Select TWO).

/home /var

If not cleared out, log files can eventually consume a large amount of data, sometimes filling a drive to its capacity. If the log files are on the same partition as the operating system, this could potentially bring down a Linux computer. Which of the following directories (or mount points) SHOULD be configured on its own partition to prevent this from happening?

/var

For which of the following directories should you create separate partitions? (Select TWO).

/var /home

Which system component verifies the hardware and passes control of the computer to the boot loader?

BIOS

Which of the following is a characteristic of a symbolic link?

Distinct (non-duplicate) inode.

Which of the following are true about the ASCII character set? (Choose TWO.)

Does not include international symbols. Uses a seven-bit encoding technique.

Which environment variable overrides all other locale settings and sets all locales to the same setting?

LC_ALL

Match the locale environmental variable name on the left with the description on the right.

Specifies personal name format: LC_NAME Specifically used an override for LC_MESSAGES: LANGUAGE A special variable for overriding every other environment setting. It sets all locales to the same setting: LC_ALL Defines every locale setting at once while allowing further individual customization via the LC_* settings: LANG

Which of the following is the primary role of a mail transfer agent (MTA)?

Store messages so they can be downloaded or send email to a destination MTA

Which of the following statements BEST describes the effects of the split -50 -d -a 3 AllNames FiftyNames- command if there are 103 lines and 240 bytes in the file?

The AllNames file is split into three files containing 50 lines or less. The output is FiftyNames-001, FiftyNames-002, and FiftyNames-003.

Which of the following statement describes file globbing?

Using wildcards to match specific files.

Which awk/sort command combination displays a sorted list of usernames in the /etc/passwd file?

awk -F: '{print $1}' /etc/passwd | sort

What would you enter at the command prompt to start a new Bourne-again shell (bash) session?

bash

You are accessing the /home/shants/depsmark text file through a terminal connection. The file has long lines of text, yet your terminal only shows 75 characters per line. Which of the following commands will limit the lines in the file to the limits on the terminal?

fmt -w 75 /home/shants/depsmark

Your Linux system was installed for you while you were living in the United States of America. You have since been transferred to a satellite office located in Wood Walton, England, and have taken your computer with you. Since England uses the larger A4 paper size, you would like to change the LC_PAPER locale environment variable. Which of the following is the BEST shell command to use for this purpose?

localectl

Which of the following utilities would you use to search a path for files that match a given name?

locate

Which of the following commands is used to find a specific file on a Linux system? (Select TWO. Each answer represents an independent solution.) locate

locate find

Which of the following statements BEST describes the nl -s ": " myfile command?

nl adds the number, a colon, and a space to the front of each line in the file.

You want to display the contents of ~/franksdep in hexadecimal format. You change to your home directory. How should you enter the command at the command prompt?

od -x franksdep

Which of the following commands merges two files on a line-by-line basis and separate each line with a tab?

paste

Which of the following commands will display each line in a text file in alphabetic order?

sort

What is the core process for a systemd-based Linux system?

systemd

Which of the following commands transposes characters in a text steam?

tr

After using the locate command, you discover some of your files are not being listed in the search results. What would you enter at the command prompt to update the /var/log/locatedb file?

updatedb

You use a program on your Linux system called photorec. What would you enter at the command prompt to display the path to the photorec binary file?

which photorec

A user has requested that each time she presents credentials to log in , a particular entry be written to a log file. This action will only apply to her, and she is using the bash shell. Which of the following configuration files is the BEST to modify to enable this action?

.profile

Under the Filesystem Hierarchy Standard (FHS), what is the full path to the directory that contains the device files for a Linux system?

/dev

Anna, a system administrator, wants to set a global variable that can be used each time she logs in. Currently, she has to set the variable each time a terminal is opened. Which of the following files would need to be modified to make a global variable persistent? (Choose TWO.)

/etc/profile ~./bash_profile

According to the Filesystem Hierarchy Standard (FHS), which of the following directories contains information about the system state and processes?

/proc

What is the full path to the directory that contains data files that change constantly, including email, print jobs, and proxy cache files?

/var

After opening a file in vi, you want to switch from Command Mode to Command Line Mode. What key invokes Command Line Mode?

:

As an administrator, you are tasked with configuring an Apache web server by modifying the /etc/apache2/apache2.conf file. You open the file in vi. As you are looking at the file, you knock over your spill-proof drink container onto the keyboard. It rolls over several keys as you try to pick it up. Now there are extra characters everywhere in the text buffer. Which of the following command scan you use to exit vi without saving changes that were made to the text buffer?

:q!

Which of the following vi key combinations should you press while in Insert Mode to save the file you are working on and quit?

<Exc>:wq

Drag the server role to its proper description

A protocol used to communicate with and monitor network devices and servers: SNMP A protocol used to securely log on to remote systems using encryption: SSH Resolves (or maps) the fully qualified domain names (FQDNs) to IP Addresses: Name Server A program responsible for accepting HTTP (Hypertext Transfer Protocol) requests from clients

Which of the following actions can be used to define a persistent alias?

Add the command defining the alias to the appropriate shell configuration file.

Which of the following is displayed when the uname -a command is run?

All system information

Tim, a system administrator, wants to simplify the provisioning and simplify of user accounts. Which of the following server roles should Tim install and configure

Authentication server

Which of the following is the standard shell for MOST Linux computers?

Bourne-again shell (bash)

Drag the server role to its proper description

Capturing a timeline of events that have taken place on the computer in the form of a file: Logging A type of network that uses encryption to allow IP traffic to travel securely over the TCP/IP network: VPN Increases response time to back-end servers by distributing the workload across the available servers: Load Balancer A computer that provides indirect internet access to the computers in your network: Proxy

Your company recently setup a VPN and wants to use a digital certificate for authentication instead of a pre-shared key. Which of the following server roles would allow the company to provide this functionality internally instead of using an external provider?

Certificate Authority

Your company develops applications to run on Linux systems. You currently have four teams working on a different aspect of the same application. Which of the following server roles would give you the BEST method for testing all team members' code without effecting your part of the project or your operating system and personal files?

Containers

Users are complaining that they are unable to connect to any severs or the internet. Based on the symptoms they describe, you suspect that the users are not being assigned the correct IP addresses.

DHCP

Alex, a webmaster, is implementing an order processing system on the company's website. Which of the following server roles should Alex implement with the order processing application?

Database

Which of the following man page sections shows a list of options available for a Linux command and explains what the options do?

Description

Your company uses both Linux desktops and Windows desktops. Which of the following server roles should be used to provide a central location for users of both operating systems to share files.

File servers

Which of the following commands configures the shell to retain 300 recently used commands in the ~/.bash_history file for multiple shell sessions?

HISTFILESIZE=300

Which environment variable affects the number of past commands stored in memory in the current shell session?

HISTSIZE

Which of the following statements BEST describes the PATH environment variable?

It contains the directory prefixes used to search for programs and files.

Your company has been expanding the number of servers in the company's data center, and there is an increased need to gather metrics, watch process states, work with logs, watch services states and file system usage. Which of the following server roles should be installed to provide this functionality?

Monitoring

Which of the following commands utilize command substitution?

Myvar='sort -r names.txt myvar=$(sort -r names.txt)

Users are complaining that the clocks for their operating systems do not match the current time for the location in which they live

NTP

You want the directory /sbin/special to be included in the PATH environment variable. You also want to keep all the current directory entries currently in the PATH variable. Which of the following commands would you use?

PATH=$PATH:/sbin/special

Using the vi editor in Insert Mode, you made a few changes to the /boot/grub/grub.comf file. You now need to switch to command mode, save the changes, and quit. Which of the following key strokes and command should you use?

Press the Esc key Type :wq

Which of the following server roles would you implement to provide services offered by CUPS and IPP?

Print server

Linux can be implemented in many different ways

Running Linux and Windows on the same physical computer: Linux Virtualization Infrastructure as a Service: Linux and Cloud Computing Used by google on many of the physical products it sells: Linux on mobile devices Manages intelligent devices, such as automation and control equipment: Embedded Linux

Drag the permission string on the left to the category on the right. Some permission strings will not be used.

Symbolic Link: lrwxrwxrwx Hard Link: -rwxr-xr-x

Which of the following statements BEST describe the purpose of the Filesystem Hierarchy Standard (FHS)? (Select TWO).

The FHS allows software installation routines to predict where to place configuration files. The FHS allows users to predict where to find system configuration files.

Match the vi mode on the left to the correct definition on the right.

The initial vi mode used when vim is started. It has command sthat cut and replace text, and it is the mode vi uses to enter the other modes: Command Mode The vi mode that works with the file system. Use it to save files after editing them: Command Line Mode The vi mode that vim uses to write and edit text in the file: Edit Mode

The ls command in the current working directory gives the following listing: lrwxrwxrwx 1 root root 4 2010-11-05 mydata -> shantsgems-rwxr-xr-x 1 root root 382 2010-10-05 shantsgems Which of the following is true of the files in this listing?

The mydata file is a symbolic link to the shantsgems file.

Ted, a Linux user, creates symbolic links in his home directory to a set of files in their /data directory using the ln -s command. Later, a system administrator deletes the files in the /data directory. What happens to the symbolic links that Ted created?

The symbolic links still exist in Ted's home directory, but they are useless because the link has been broken.

Which of the following is a characteristic of a hard link?

Valid inode for the file data even if the original file is deleted.

Which of the following nano editor keyboard shortcuts will display help text which includes a list of all keyboard shortcuts?

^G (Ctrl+G)

Which command displays a list of the currently defines aliases on the system?

alias

Mary Brown is a Linux user with the username mbrown. Mary has a directory named logs in her home directory that is regularly updated with new log fiels when certain system events occur. She runs the following commands several times a week to check this directory: cd /home/mbrown/logs ls -al

alias logcheck="cd /home/mbrown/logs;ls -al"

Which of the following commands stores the output of the ls _a command in a shell variable named allfiles?

allfiles=$(ls -a)

Which of the following commands searches man pages for a specific keyword? (Seclect THREE.)

apropos whatis man -k

Which of the following commands sorts the contents of the wordlist1 and the wordlist2 file and sends the result to a standard output?

cat /usr/wordlist1 /usr/wordlist2 | sort

Which of the following command sorts the combined contents of the wordlist1 and wordlist2 files and sends the results to both the screen and a file named sortedwordlist?

cat /usr/wordlist1 /usr/wordlist2 | sort | tee sortedwordlist

Which of the following commands gives the same results as cat < turbo

cat turbo1

Which of the following command copies the entire /temp directory with all of its files, sub-directories, and files in the sub-directories to the /home/gshant directory.

cp -r /temp /home/gshant cp -R /temp /home/gshant

A Linux administrator is logged in as root and needs to copy a file named letter.doc from the USB flash drive mounted under /media/usb. Which of the following commands will copy the file from the USB flash drive to the root user's home directory?

cp /media/usb/letter.doc /root

Tom, a shell script developer, knows that a the date +%A command gives the current local weekday name. Which of the following command will copy the authentication log file, /var/log/auth.log, to a new file that with a filenname that includes the current local weekday name?

cp /var/log/auth.log ~/auth$(date +%A).log

Which of the following commands shows the value of the LANG environmental variable currently set for the language the operating system uses?

echo $LANG

Two users hsould have identical settings, yet one is having problems with the display on his screen, and you suspect there is a difference in their environment variables. Which of the following commands displays all of the environment variables?

env

As a Linux user, you have access to an executable file named myapp. It's found in the current directory, but not in the command path. What would you enter at the command prompt to start the myapp file and replace the shell with myapp process?

exec ./myapp

You need to set the COMP variable to the value 1745. Which of the following commands sets the variable so it is inherited by subsequent child shells?

export COMP=1745

Which of the following commands should a Linux user enter to see a list of all the commands the user recently ran at the command prompt?

history

If you are viewing the contents of a man page, which key can you press to get back to the beginning of the page?

home

Leroy needs to create a link to a file in the /opt/corp directory that points to the original file in /usr/bin directory. The file is named "scrub". The /opt directory is on a separate physical drive with a separate file system than /usr/bin. Which of the following commands will work?

ln -s /usr/bin/scrub /opt/corp/scrub

You need to view the contents of the /home/jerrys directory. What would you enter at the command prompt to show all the contents, including hidden files and directories?

ls -a /home/jerrys

Which of the following commands displays an expanded listing that includes the ownder and size of all the files in the /etc directory?

ls -al /etc

A user attempts to view the contents of a directory, but the output of the ls -l command scrolls beyond the limit of one console window. Which of the following commands would allow the users to see the full listing of the directory?

ls -l | less

Ann, a Linux script developer, is trying to debug a shell script that has the command ls -s in it. She suspects that an error is occurring, and she wants to send the results of the operation and any errors to a file named ~/Friday in order to examine it later. Which of the following commands should she use?

ls -s &> ~/Friday

Fred, a Linux administrator, needs to create the directory /var/oracle/database/91. Only the directory /var currently exists. The current working directory is the root of the files system. Which of the following commands will create the directory path?

mkdir -p /var/oracle/database /9i

Which of the following commands will move a file from one location to another?

mv

Which of the following commands will change the /home/pmallory/reports file's name to reports.bak

mv /home/pmallory/reports /home/pmallory/reports.bak

Joe, a bash script developer, is trying to debug a shell script named myscript. Which of the following commands would record the output of the script in a text file?

myscript >> testfile.txt

While in vi Command Mode, you copy a whole line of text to the general buffer. You then navigate to a different location in the file. Which of the following commands will paste the copied text?

p

What would you enter at the command prompt to display the current working directory?

pwd

Within the /var directory is a subdirectory named backup. Ken, a Linux administrator, needs to delete the directory backup and any files taht it contains. He changes the directory focus to /var. Which of the following commands deletes the directory named backup and any file it contains?1

rm -r backup

The /home/gshant/smp directory contains several files. the directory and files need to be removed. The current working directory is /home/gshant. What would you enter at the command prompt to remove the smp directory and all the files it contains?

rm -r smp

Which command reads from standard input (stdin) and writes to both standard output (stdout) and a file?

tee

Which of the following describes the effects of the ls -l /usr/bin >> /tmp/list.txt command?

the contents of the /usr/bin directory are written to a file named /tmp/list.txt. Previous file contents are kept, and the new informaiton is added to the end of the file.

Which of the following commands will change the /home/gshants/smile file's modification and last accessed times to the current time?

touch /home/gshants/smile

Which command overcomes the 128 kb shell command size restriction by breaking up long lists of arguments?

xargs

A technician has been given a work order to install the Apache webserver on a system configured with a YUM repository. Which of the following commands will install the webserver?

yum install httpd

What command would you enter while in vi command mode to copy an entire line of text to the general buffer?

yy

Which command operator pipes the output of one command as the input of another command?

|

Which of the following filres would you use to create aliases that are applied when a specific user starts a bash session? (Select TWO. Each answer is an independent solution.)

~/.profile ~/.bashrc


Set pelajaran terkait

3rd semester: 1st test practice questions

View Set

Cell Bio Lecture 14: Membrane Proteins

View Set

EOC Milestone practice 9th grade biology Pt.1

View Set

MCAT-PREP GS-2 (Shortened) - Questions I missed/need to review

View Set

QBank Questions: Course 102 Ch: 4

View Set

Conjugaison SE LAVER, SE LEVER, S'HABILLER et S'APPELER

View Set