Test Out Linux Pro - Exam 2

Ace your homework & exams now with Quizwiz!

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

cat

****LAB**** You need to view detailed information for the hr directory in the root (/) directory. Type ls -l / at the prompt to answer the following questions: What is the directory size? What is the modified date?

12586 Mar 15 2009

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

/root

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

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 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 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

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

grep world MTS

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

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).

/var /home

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

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

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 awk/sort command combination displays a sorted list of usernames in the /etc/passwd file?

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

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

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 finds files with the .txt extension in the /home/gshant directory?

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

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 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

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

sort

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

swap

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

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

/var /home

****LAB**** Type ls -a /hr at the prompt to answer the question. What is the name of the hidden directory in /hr?

.sanford

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?

/

****LAB**** The /etc/shells file contains a list of shells that are available on the current system. Type cat /etc/shells at the prompt to answer the following question: Which of the shells listed below is not available on the system?

/bin/ksh

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

/etc /proc /bin

****LAB**** Type pwd at the prompt to answer the following question: What is your current working directory?

/home/wadams

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

/lib /sbin /dev

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

/proc

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

****LAB**** Someone created duplicate versions of three project documents. To avoid version control problems, you need to delete the duplicate files. Use the rm -f command to delete a file without prompting. In this lab, your task is to delete the following files from the /projects directory: darkhorse1 camouflage1 endgame1 When you're finished, use the ls command to verify the deletion.

1. At the prompt, type rm -f /projects/darkhorse1 and press Enter 2. Type rm -f /projects/camouflage1 and press Enter 3. Type rm -f /projects/endgame1 and press Enter 4. Type ls -l /projects and press Enter to verify the deletion of the files

****LAB**** Peter Lacy (placy) has taken an extended leave from the company for personal reasons. However, he was working on a critical project code named White Horse with several other employees. The project leader requested that you move any White Horse documents in Peter Lacy's home directory to Brenda Cassini's (bcassini's) home directory. You're logged on as wadams. Use the mv command to move files. You must log in as the root user to have the necessary permissions to move other people's files. In this lab, your task is to: Switch to the root user using 1worm4b8 for the root user password. You must have root user permissions to move other people's files. Move the following files in placy's home directory to bcassini's home directory. confid_wh projplan_wh When you're finished, use the ls command to verify the new location of the files.

1. At the prompt, type su - and press Enter 2. Type 1worm4b8 as the password and press Enter 3. Type mv /home/placy/confid_wh /home/bcassini and press Enter 4. Type mv /home/placy/projplan_wh /home/bcassini and press Enter 5. Type ls -l /home/bcassini and press Enter to verify the new location of the files

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

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

Distinct (non-duplicate) inode.

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

****LAB**** View the contents of the /root/.bash_profile file. Type cat /root/.bash_profile at the prompt to answer the question. What is the last word in the file?

PATH

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.

Leroy tries to copy some files to an ext3 volume and received the following error: "No space left on device." Leroy executes the df command and determines that there is sufficient space to copy the files. He also verifies that he has permission to copy the files. Which of the following BEST describes Leroy's problem?

The number of inodes has been exhausted.

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 are true about the ASCII character set? (Choose TWO.)

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

Which of the following statement describes file globbing?

Using wildcards to match specific files.

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 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 find

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

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

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

paste


Related study sets

Tuckman's 5 Stage Model of Team Development

View Set

BLS for Health Care Providers Course Study Cards

View Set

real estate financing principles

View Set

Chapter 9: Homework & Video Questions

View Set

chapter 3 physics vocab + practice questions

View Set

Exponential and Logarithmic Functions

View Set