CSCI 2380 chpt 1,2,3

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

12) You are working with a new colleague who has entered the man command, but who does not know how to end the man session to return to the regular command prompt. What keystrokes do you show your colleague to end the man session? (Choose all that apply.) a. q b. Alt+s c. Shift+Spacebar d. Ctrl+Alt+Del

a. q

20. Which of the following commands enables you to use online help in Emacs? a. Ctrl+? b. Ctrl+h c. ? d. Ctrl+q

b. Ctrl+h

14)Which of the following commands enable you to view the contents of a file? (Choose all that apply.) a. less b. cat c. grok d. whatis

b. cat

2. You receive a message that you've successfully backed up hda2 on your Linux system. What is hda2? a. the second disk on a two-disk system b. the second partition on your main hard disk c. the files on a CD d. the subdirectory under the /root directory that houses the kernel

b. the second partition on your main hard disk

6. You have mounted a remote network drive and now you want to unmount that drive. Which of the following commands do you use? (Choose all that apply.) a. bye b. umount c. driveoff d. Disconnect

b. umount

How can you find out information about the status of an editing session while in the vi editor? (Choose all that apply.) a. Type :status while in command mode. b. Press Ctrl+? while in insert mode. c. Press Ctrl+g while in command mode. d. Press the Spacebar twice while in command mode.

c. Press Ctrl+g while in command mode.

3. You have purchased a special monitor for your computer and the instructions tell you to make a minor modification to the inittab file. Where would you locate this file on a typical Linux system? a. /var b. /fastboot c. /home/users d. /etc

d. /etc

22)How would you describe the purpose of the more command?

the more command displays a file one screen at a time and it only allows scrolling down.

What is the process called compiling?

Compiling is a process of translating a program file into machine-readable language

Which of the following are menus that you would find on the menu bar in Emacs? (Choose all that apply.) a. View b. Options c. Edit d. Buffers

b. Options c. Edit d. Buffers

18)You work at a law firm with eight other people. All of the eight computers on the firm's network use wireless connections to communicate with one another without a server. This is an example of which of the following? a. a central network b. a peer-to-peer network c. a stand-alone serial network d. a Telnet spoke network with no hub

b. a peer-to-peer network

Your boss drops by your office in a hurry to ask you to attend a meeting at 10:30 on Friday morning and you can't find a pen to make a note as a reminder. What Linux command can you use to make a quick note to store in a file called Meeting? a. note: Meeting b. cat > Meeting c. Meeting >> note d. record = Meeting

b. cat > Meeting

21)Your international company is scheduling a meeting among managers in Canada, the United States, Spain, Sweden, and Hong Kong on the basis of Greenwich Mean Time (GMT). What command enables you to display the current time in GMT? a. time -g b. date -u c. cal -t d. hour -g

b. date -u

9) SSH can be used to: a. analyze the security on a UNIX or Linux computer b. log in remotely to another computer on a network c. quiet the volume of the sound card d. quickly switch to another user account on the local computer

b. log in remotely to another computer on a network

21. You have created many notes to yourself that end in .txt. Which of the following commands enables you to list all of the .txt files in your home directory while you are in the Bash shell? a. dir ##.txt b. ls *.txt c. cp .txt -all d. cat $.txt

b. ls *.txt

5. Your new colleague asks which partitions vendors recommend setting up on a Linux system. Which of the following partitions do you include in your response? (Choose all that apply.) a. /backup b. root c. swap d. /boot

b. root c. swap d. /boot

9. In UNIX and Linux systems, what source of extra memory space is used when working on tasks and files that exceed the RAM capacity on chips in the computer? a. register memory contained on the circuit board used to run the monitor b. swap partition c. /mem directory d. memory subdirectory under the /users directory (/users/mem)

b. swap partition

19. Which of the following are permissions that can be granted to a file? (Choose all that apply.) a. start b. write c. execute d. manage e. Read

b. write c. execute e. Read

You are using the vi editor to create a list of tasks on each line and you would like an easy way to number each line (task) listed in the file. Which of the following is an easy solution? a. Press Alt+F2 to turn on automatic numbering for text. b. When you first start vi from the command line, type vi -n. c. Enter the number 1 plus a period at the beginning of the first line, and then each new line will be numbered automatically. d. From command mode, enter :set number.

d. From command mode, enter :set number.

5. You are in the vi editor and it's now noon. Every day at noon you run a program called update, which updates a database. How can you run the program without closing your vi session? a. From command mode, press #, type update, and press Enter. b. From insert mode, press Alt+ and then type update. c. From insert mode, press && twice and then type update. d. From command mode, type :!update and press Enter.

d. From command mode, type :!update and press Enter.

You're editing a document using vi and you are near the end of a page. You want to quickly go back to the top of the page to check something you said. Which of the following command-line commands enables you to quickly go to the top of the page? a. :top b. T c. Go1 d. H

d. H

6) Which of the following is the UNIX distribution originally developed through AT&T Bell Labs? a. SUSE b. BSD c. TurboUNIX d. SystemV

d. SystemV

How can you print a file while you are in the vi editor?

To print a file while in the vi editor type:lpr filename and press Enter

10. When you copy text in Emacs, you must mark the text you want to copy by using which of the following commands? a. Use Ctrl+Tab to mark the beginning of the text and Ctrl+Shift to mark the end. Next press Alt+z to copy the text. b. Use Ctrl+Spacebar to mark the beginning of the text and Alt+w to mark the end as well as to copy the text. c. Use :mark to mark the beginning of the text and :endmark to mark the end as well as to copy the text. d. Use @begin to mark the beginning of the text and @end to mark the end. Next type :copy to copy the text.

b. Use Ctrl+Spacebar to mark the beginning of the text and Alt+w to mark the end as well as to copy the text.

You have just pressed Ctrl+x, Ctrl+s in the Emacs editor thinking that this will exit Emacs, but it seems like nothing has happened. What is the problem? a. The x and the s are lowercase and you must instead type X and S. b. You have the order reversed and must instead type Ctrl+s,Ctrl+x. c. Ctrl+x,Ctrl+s is a command sequence that saves your file, but it does not cause Emacs to close. d. Ctrl+x,Ctrl+s is used to expand the buffer size, which is a process you don't see on the screen; and this command sequence does not exit Emacs.

c. Ctrl+x,Ctrl+s is a command sequence that saves your file, but it does not cause Emacs to close.

3. When you started the vi editor, you forgot to specify the name for the new file you are creating. To save steps next time, how can you specify the name of a new file when you first start vi? a. Enter vi -n at the command line and then type in the file name when prompted. b. Enter vi -n and the filename, such as vi -n myfile. c. Enter vi and the filename, such as vi myfile. d. Enter vi ? and then enter the file name when you see the > prompt on the command line.

c. Enter vi and the filename, such as vi myfile.

4) You haven't changed your user account password for several months and now decide to create a new password. Which of the following commands should you use? a. changepass b. newpass c. cat -p d. passwd

d. passwd

What is the name of a standardized bit pattern for characters and numbers that is used by most computer operating systems?

The name is American Standard Code for Information Interchange (ASCII)

17. You are curious about the error and system logs kept by your operating system. In what main directory under the root (/) would you most likely find these logs? a. /var b. /sbin c. /tmp d. /sys

a. /var

While you are working on a report in vi, you decide to insert information from another text file in your home directory called summary_data. Which of the following commands (from command mode) enables you to add the contents of summary_data? a. :r summary_data b. +summary_data c. add summary_data d. #copy summary_data

a. :r summary_data

7) Which shell is used by Linux as the default command interpreter? a. Bash shell b. Korn shell c. Bourne shell d. C shell

a. Bash shell

3) While you are typing a command, you misspell the name of a file you want to specify with the command. Which of the following command-line key combinations enables you to go back and fix your error? a. Ctrl+b b. Alt+End c. Ctrl+2 d. Shift+Alt+m

a. Ctrl+b

14. You have been working on a long vi text file and now you've got to rush off to a meeting. How can you quickly save your work and exit the vi editor? (Choose all that apply.) a. From command mode, enter :wq. b. From command mode, enter :ZZ. c. From command mode, enter :bye. d. From command mode, enter :x.

a. From command mode, enter :wq. b. From command mode, enter :ZZ. d. From command mode, enter :x.

15. While editing a file in vi, you realize you have been spelling the word receive as recieve. How can you find all occurrences of your misspelled receive? (Choose all that apply.) a. From command mode, type /recieve and press Enter. b. From insert mode, type Alt+r and enter recieve. c. From command mode, press F4 and enter recieve. d. From insert mode, press F7 and enter recieve.

a. From command mode, type /recieve and press Enter.

You are preparing to give a training session on the vi editor. How would you describe it? (Choose all that apply.) a. It is modal. b. It is a text editor. c. Most UNIX/Linux distributions come with vi. d. It is a screen editor.

a. It is modal. b. It is a text editor. c. Most UNIX/Linux distributions come with vi. d. It is a screen editor.

14. Which of the following are file systems supported by UNIX and Linux operating systems? (Choose all that apply.) a. NTFS b. vfat c. PICK d. ufs e. ext

a. NTFS b. vfat d. ufs e. ext

You've used Emacs to write advertising copy about a new software product your company has developed. Now you find out that the name of the product has been changed slightly. What command can you use to track down all references to the old name so you can locate them? a. Press Ctrl+s. b. Press Alt+f. c. Type :find. d. Type #locate

a. Press Ctrl+s.

13) Which of the following are examples of Linux distributions? (Choose all that apply.) a. SUSE b.Linux Enterprise b. Mandriva c. Fedora d. Red Hat Enterprise Linux

a. SUSE b.Linux Enterprise b. Mandriva c. Fedora d. Red Hat Enterprise Linux

10. You are always scheduled for two or three meetings each day and need to keep an eye on the time. What PS1 variable parameter can you set in order to have your command prompt display the current time? a. \t b. \v c. /time d. /date

a. \t

19)On which of the following types of computers might you find a UNIX or Linux operating system? (Choose all that apply.) a. a mainframe computer b. a desktop PC c. a server d. a workstation used for scientific research

a. a mainframe computer b. a desktop PC c. a server d. a workstation used for scientific research

1. You are using vi to edit a file and have just entered 12 new lines. You need to replicate the same 12 lines right after you enter them. What command-mode command can you type to replicate the lines? (Choose all that apply.) a. a period (.) b. Ctrl+r c. Ctrl+R d. a dollar sign ($)

a. a period (.)

2) Before you make the note in Question 1, you decide to determine Friday's date, so that you can include it in your note. What Linux command can you use to quickly determine Friday's date? a. cal b. date -cal c. weekday d. time -d

a. cal

4. You're frantically trying to get ready for a meeting and want to access a file in your home directory, but you are currently working in a public directory open to all users. What command can you enter to instantly go to your home directory? a. cd b. home c. go d. fetch

a. cd

7. When you connect a printer via a USB port on your Linux computer, which type of device special file is used to handle streams of data sent to and from the printer? a. character special file b. block special file c. root device file d. port device file

a. character special file

13. It's late and you have been working all day to finish a report. Before you go home, you want to copy several files, including your report file. What copy command should you use to ensure that you don't inadvertently copy an older report file over the newer report file you've been working on for the last four hours? a. cp -u b. cp --warn c. copy -w d. copy --caution

a. cp -u

15)When you enter the who command, what information do you see? (Choose all that apply.) a. the users on the local system b. the owner of the local system c. a listing of all authorized users on a system, regardless of whether or not they are logged in d. a listing of all computers on your local network

a. the users on the local system

How can you get help for using the vi editor? (Choose all that apply.) a. From insert mode, press :doc. b. From command mode, enter :help. c. From ex mode, enter ?doc. d. From the regular command line outside of vi, enter man vi.

b. From command mode, enter :help. d. From the regular command line outside of vi, enter man vi.

As you look over the shoulder of an employee who is using the vi editor, you see her use the command :l $s/capitol/capital. What does this command do? a. It converts all letters to capitals in the file. b. It changes all instances of capitol to capital. c. It searches to ensure that each sentence starts with an uppercase letter. d. It finds the last instance of capital and changes it to Capitol.

b. It changes all instances of capitol to capital

2. Which of the following enables you to move the cursor to the left while you are in command mode in the vi editor? (Choose all that apply.) a. Press the right arrow key. b. Press the left arrow key. c. Press h. d. Press l.

b. Press the left arrow key. c. Press h.

1. Your company is discussing plans to migrate desktop and laptop users to Linux. One concern raised by the users is whether Linux supports the use of CDs and DVDs for both work files and for listening to music. Which of the following is an appropriate answer? a. Linux only supports hard disk file systems, such as extended file system (ext) and UNIX file system, but users can copy music (MP3) files to the hard disk to play. b. Linux can use the Reiser File System,which supports CD and DVD files of all types. c. Linux supports both the UDF and iso9660 file systems for CD and DVD use. d. Linux supports mounting CDs and DVDs by using the /removable partition.

c. Linux supports both the UDF and iso9660 file systems for CD and DVD use.

20)You're in a hurry and have just executed a command to print the contents of a file, and you decide you want another copy of the printout. What key sequence can you use to repeat the last command, which was used to print the file? a. Press Alt+P. b. Press the Backspace key. c. Press the up arrow key one time. d. Press Shift+R.

c. Press the up arrow key one time.

While working in the Emacs editor, you delete a section of text and then decide to undo your deletion. Which of the following commands should you use? a. Use the Ctrl+u command. b. Use the Alt+u command. c. Use the Ctrl+x,u command. d. You're stuck retyping the deleted text, because Emacs does not enable you to undelete.

c. Use the Ctrl+x,u command.

4. Your colleague has written a line of text in vi and now wants to delete the line, but save its contents in a buffer in case he decides to bring back the line he deletes. What do you recommend? a. While in command mode, move the cursor to the last character in the line and press d-. b. While in insert mode, move the cursor to any character in the line and press Alt+d. c. While in command mode, move the cursor to the first character in the line and press dd. d. While in insert mode, move the cursor to the last character in the line and type :#delete

c. While in command mode, move the cursor to the first character in the line and press dd.

8) You need to type in a line of text to the end of a file called Annual_Report. Which of the following commands enables you to add the text? a. add = Annual_Report b. append < Annual_Report c. cat >> Annual_Report d. append @ Annual_Report

c. cat >> Annual_Report

20. Which of the following commands enable(s) you to set permissions on a directory after you create it? (Choose all that apply.) a. mkdir -p b. cpdir --permissions c. chmod d. Catperm

c. chmod

12. A member of your department has given you permissions to view the contents of the accounting directory under his home directory. The name of his home directory is bramirez. Which of the following commands should you use to display the contents of the accounting directory? a. dir accounting b. ls ~/accounting c. ls /home/bramirez/accounting d. cd -l /bramirez/accounting

c. ls /home/bramirez/accounting

5) You have forgotten the purpose of the -n option in the cat command. Which of the following can you enter at the Linux command line to find out what the -n option does when used with cat? a. what's cat -n b. ? cat c. man cat d. find -n for ca

c. man cat

11. You have been working in several directories for the past hour and right now you don't remember which directory you're in currently. What command can you use to show your current working directory? a. showme b. where am i c. pwd d. dir -w

c. pwd

11) In your document files, you often put the date you created the file and the date you last modified it in the last two lines of the file. What command can you use to look at only the last two lines of the file, called project? a. show -l 2 project b. display project -2 c. tail -n 2 project d. less/2 project

c. tail -n 2 project

You've just finished entering a one-page memo in Emacs and now want to quickly go to the beginning so you can reread it. What command enables you to quickly go to the beginning? a. Alt+b b. Alt+H c. Go 1 d. Alt+<

d. Alt+<

8. Some of the users in your company create and delete so many files that they have problems with fragmented disks. Which of the following new features in the ext4 file system help to reduce fragmentation problems? a. hot swap b. fragmonitor c. smaller file sizes d. Extents

d. Extents

18. A friend of yours is trying to make more space on his hard disk drive and is considering deleting the /lib directory because he has heard it mostly contains games that he doesn't use. What is your recommendation? a. Delete the /lib directory because it mainly contains old games anyway. b. Before deleting the /lib directory, copy the config file to another directory, because this file is used to configure games and other software. c. Delete the /mnt directory instead, because it contains backups of changed maintenance and log files. d. Keep the /lib directory because it holds security information, shared library images, kernel modules and other important files.

d. Keep the /lib directory because it holds security information, shared library images, kernel modules and other important files.

15. You are helping a friend who is new to Linux. You want to determine which entries under her home directory are directories instead of files. When you perform a long listing of the home directory's contents, what do you use to distinguish a directory from a file? a. The very first character in the line for an entry will be either "~" for a directory or "$" for an ordinary file. b. The very last word in the line for an entry will be "file" or "directory." c. The last character appended to the entry's name will be either"1"for an ordinary file or "2" for a directory. d. The very first character in the line for an entry will be "d" for directory or "-" for an ordinary file.

d. The very first character in the line for an entry will be "d" for directory or "-" for an ordinary file.

17)You share a Linux computer with a coworker. What is the best way to exit your UNIX or Linux session when you are done? a. Turn off the computer using the on/off switch. b. Use the Shut Down option even though your coworker may want to access the computer after you, because this is the best way to fully reinitialize security for the next user session. c. Use the over >> out command. d. Use a GUI menu option to log out or enter an appropriate command for the shell you are using, such as exit or logout (if there is no GUI desktop in use).

d. Use a GUI menu option to log out or enter an appropriate command for the shell you are using, such as exit or logout (if there is no GUI desktop in use).

16)You have been entering lots of commands and now your terminal window is cluttered will all kinds of activity. What command can you use to clear your window of the clutter? a. clean b. freshstart c. new d. clear

d. clear

16. Your boss is planning to do some house cleaning by deleting several old files. However, she mentions that she doesn't want to delete an important file inadvertently. What command can she use so that she is prompted to make sure she wants to delete a particular file? a. del ? b. cp -d c. write -del -q d. rm -i

d. rm -i

10) This is your first day on the job as a Linux server administrator and your boss gives you the password for root. What is root? a. the name of a practice user account b. a program used to determine the users on a Linux server and what they are doing c. the lowest layer or branch of security, because you must work your way up in levels of security to prove to a UNIX/Linux system that you have the skills to be an administrator d. the administrative account that has complete access to a UNIX/Linux system

d. the administrative account that has complete access to a UNIX/Linux system


Ensembles d'études connexes

AMT General Prep ----- Materials and Processes

View Set

Programming Output and Input Quiz

View Set

Artificial Intelligence: A Modern Approach Chapter 2 Intelligent Agents

View Set

Chapter 2: Client care and Body Systems - Practice Exercise

View Set

Chapter 24: Using Nursing Research in Practice: 8th edition

View Set

BACTERIAL CAUSES OF SORE THROAT I: Streptococcus

View Set

ACT 101 Chapter 9 Cash Receipts, Cash Payments, and Banking Procedures

View Set