Week One Quiz - Franklin



1) A live-disk operating system is one that runs from a CD drive and is not installed on your hard drive.

True

False

2) The GNU Linux operating system is an open source operating system based on the principles of the Unix operating system.

True

False

3) The Knoppix live-disk operating system creates a temporary file system in main memory and does not interfere with the system hard drive.

True

False

4) Files created and modified while using a live-disk system remain on the system even after the system is turned-off.

True

False

5) What is the most popular Desktop utilized by Linux?

a) Gnome

b) Firefox

c) KDE

d) Open View

e) Cisco Works

6) The bash shell command interpreter utilizes the PATH environment variable to locate executables and by searching down through the different file system paths. . True

False

7) An operating system (OS) is a program that controls the execution of application programs and acts as an interface between the user of a computer and its computer hardware.

True

False

8) The man page associated with the Unix/Linux operating system provides information on the usage of every command, system call, and library call.

True

False

9) The K Menu displays two icons that show life preservers. Those life preservers are comparable to the “help” icon.

True

False

10) What are the objectives for an operating system?

a) Ability to evolve

b) Functionality

c) Efficiency

d) Convenience

e) None of the above

11) A common Linux command utilized for paging through screen output is:

a) diff

b) mv

c) cp

d) less

e) view

12) When using a Knoppix live-disk system, the root file system is considered a transient file system know as ramdisk.

True

False

13) What command is utilized to list the current processes executing on the system?

a) ls –l

b) cat /etc/fstab

c) mount

d) umount

e) ps -ef

14) The Unix operating system utilizes two types of user interfaces: graphical user interface (GUI) and character user interface (CUI).

True

False

15) One very useful feature of the Unix/Linux operating systems is the presence of

online manual (man) pages.

True

False

Knoppix is considered a comfortable software package and is widely respected within the Debian distributions. Does the Knoppix format meet the guidelines for the ISO standards (iso9660)?

a) True

b) False

2. Is Knoppix software free and modifiable?

a) True

b) False

3. All data in the Knoppix file system is known as:

a) ramdisk

b) Swap space

c) Protected memory

d) Read-only memory

e) None of the above answers

4. What are the two types of text editors used on Linux.

a) Character-oriented

b) Line-oriented

c) Easy-Edit oriented

d) Graphical editors

5. The “house” icon launches a file manager, and initializes your login directory.

a) True

b) False

6. What icon can be used to launch an ftp session with cs.franklin.edu?

a) Earth

b) Monitor

c) Konqueror

d) Birds

e) Left most button

7. Is bash shell the default command interpreter for your monitor?

a) True

b) False

8. Using pipes requires that the command on the left of the pipe sign produce output to stdout, while the command to the right receive the input from stdin.

a) True

b) False

9. The PATH variable contains directories that the shell searches for executable program.

a) True

b) False

10. In Linux, the forward slash (/) is utilized as a path separator.

a) True

b) False

11. The “cp” command copies a variable to another named variable and the original variable removed.

a) True

b) False

12. The “less” command is used to evaluate conditional statements.

a) True

b) False

13. A Linux file system designates one file system to be called the root file system.

a) True

b) False

14. The “find” command is used to locate files on a UNIX or Linux systems?

a) True

b) False

15. UNIX has three basic classes of file access for which protection may be specified separately as “User”, “Group”, and “Other”.

a) True

b) False

16. The shell “for” loop below will output the echo statement five times.

for i in a b c d

do

echo $i > test_file$i

done

a) True

b) False

1) What are the two types of text editors used on Linux?

a) Text-Editor #

b) GUI Based editor #

c) Word-oriented editor

d) Easy-Edit oriented

2) The Knoppix file system stores all data in which of the following places:

a) Swap space

b) Protected memory

c) Read-only memory

d) ramdisk #

3) The Linux man page documentation uses which paging command to scroll through output data?

a) more

b) less #

c) All of the above answers

d) None of the above answers

4) The Linux, HP-UX, and UNIX path separator is which of the following:

a) :

b) / #

c) \

d) >

e) None of the above answers

5) The Live-CD system utilizes a root file system that is transient in main memory.

a) True #

b) False

6) Identify the software packages that are open source software.

a) Open Office #

b) Linux #

c) HP-UX

d) Windows

e) Password Safe #

7) An operating system is a software application that controls execution of application programs, network security, and serves as an interface between the users of the kernel.

a) True #

b) False

8) On a UNIX/Linux system, what are the correct answers for $0, $1, and $2 if the command line is ./srch.sh if then or

a) $0=./srch.sh #

b) $6=srch.sh

c) $4= or

d) $2=then #

e) $1=if #

9) What variable contains the list of directories to be searched for executables?

a) TERM

b) HOME

c) PATH #

d) SHELL

10) In your own words, describe what the following shell commands do.

11.1 cat test_file &

11.2 FIRST_VALUE=$1

11.3 if [ $# -gt 2 ]

then

echo “I only want some many positional arguments on the command line”

fi

11.4 cd $2

11.5 if [ -f $FILE_NAME ]

then

echo “The name contained in the variable is not a directory”

fi

Answers:

chop % cmp

#? $# rm

$ARGV[0] >> rmdir

scalar@ARGV $ARGV[1] @ARGV

diff less shift

who date cut

find grep ;

touch ps >test_file

@ $

________________________________________________________________________

Questions:

1. ___________What Shell command is used to find the files names in a directory or directories? find

2. ___________What Shell command reports the users logged on a system. who

3. ___________What Perl syntax is utilized to remove the last character of a string? chop

4. ___________What Shell command provides a count of the number of arguments on the command line? $#

5. ___________What Perl syntax provides the first positional command line argument? $ARGV[0]

6. ___________What Perl syntax provides the second positional command line argument? $ARGV[1]

7. ___________What Shell syntax is used to create a named file that contains zero bytes? >test_file

8. ___________What Shell command displays the difference between two files? diff

9. ___________What Shell command is used to set the system date and time? date

10. ___________What Shell command is used to append one file to the bottom of another file? >>

11. ___________What Perl syntax is used as the prefix for a scalar variable? $

12. ___________What Shell command is used to report process status? ps

13. ___________What Perl syntax is used as the prefix for a hash table? %

14. ___________What Perl syntax is used as the prefix for an array? @

15. ___________What Shell command is used to update the time stamp of a file? touch

1. Define object code:

Object code is the output from a source code compilation. It is made up of pre-parsed code, often referred to as binaries that can be linked with other object

files to generate an executable file.

2. What functionality does the umask variable provide a user with?

The umask sets the default permissions for a file and directory.

3. What function does a linker typically provide when building a software package?

The linker typically does the assembling of the components that make up the executable file. It locates any library, debuggers, and object code needed for the project.

4. What is a major benefit from using a filehandle?

The filehandle is used to replace complex input and output names with simple and shorter names. The filehandle is similar to an alias.

5. Define interpolation: Is the expansion of a variable. The insertion of a scalar or list value somewhere in the middle of another value, such that it appears to have been there along.

6. The development of Perl was influenced by what other languages?

Awk, C, and Basic.

7. Give an example of a Perl list process.

foreach (3+4, 7*7, 10/2)

{

….

}

8. What is the name of the most commonly used object code file format?

.Executable and Linking Format (ELF)

9. Identify the Perl equivalent in shell syntax.

Perl

10. $ARGV[0] __________ $0 $# (13)

11. $ARGV[1] __________ $4 $2 (11)

12. unless __________ $! if [ != ] (12)

13. scalar@ARGV _________ $1 (10) &

14. Write the substitute command used by Perl, awk, and shell to change text within a file. s/original pattern/replacement pattern/ or s/Bob/Robert/

15. What are the main features that Perl offers?

Data types don’t have to be declared. Syntax is consistent for all structures.

Error messages are documented, easy to execute scripts.

1. In Perl, dynamic typing

Dynamic typing is where different types of data are stored without explicitly specifying the type.

2. makefile is a file that contains instructions for a specific project.

3. Target –regarding the makefile is the output from a rule.

4. Dependency files - regarding the makefile these are the files that are dependent upon each other before an operation can be completed.

5. Rule - regarding the makefile are the shell statements that perform the action to produce the target. Tells make both when and how to make a file.

6. Power Monkey is a power supply for a notepad that can sustain one hour of power.

7. In Perl, pop command is a command that retrieves the last element of an array.

8. In Perl, chop command removes the last character of a string.

9. make command is the UNIX command that calls the makefile.

10. who command list all users currently accessing the system.

11. Most but not all modules can be found within CPAN, the Comprehensive Perl Archive Network for mirrored ftp sites.

a. True #

b. False

12. A regular expression is a pattern describing a certain amount of text.

a. True #

b. False

13. Anchors do not match any characters. They match a position within a string.

a. True #

b. False

14. Alternation is the regular expression equivalent of “or”.

a. True #

b. False

15. A “character class” matches only one out of several characters.

a. True #

b. False

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download