Final Flashcards

1
Q

UNIX was created in the:

UNIX was created at:

A

1970’s

AT&T Bell Laboratories in Murray Hill , New Jersey .

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Who owns Bell labs?

A

Nokia

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The original Unix development team included:

A

Ken Thompson, Dennis Ritchie and many other individuals .

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Unix distinguishes itself from its predecessors as the first portable:

A

operating system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The Unix operating system is almost entirely written in the _________ programming language, which allows Unix to operate on numerous platforms.

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The C programming language was also written by:

, so it should be no surprise that their Unix operating system is written in C.

A

Ken Thompson
And Dennis Ritchie

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The AT&T UNIX operating system was originally developed to support activities within:

A

AT&T Bell Labs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Other organizations began developing their own Unix operating systems during:

A

1970’s and early 1980’s.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

rise to the “Unix Wars during the late 1980s and early 1990s where multiple hardware vendors attempted to:

for Unix .

A

set the standard

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

List the 7 Unix wars vendors:

A

AT&T System 5 UNIX (Sys5)
University of California, Berkeley (BSD)
Microsoft (Xenix )
Sun Microsystems (SunOS / Solaris ) Hewlett-Packard (HP-UX)
IBM ( AIX)
Silicon Graphics ( IRIX)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

operating system variants, which are able to run on personal computer architectures

A

Linux

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Name 6 Linux operating system variants:

A

Ubuntu, Gentoo , Red Hat, Debian, CentOS, Linux Mint

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Two methods to remotely acces a computer running the Unix os:

A
  1. Invoke a client communication program (e.g. PuTTY) on an Internet connected computer
  2. Via a dedicated “ dumb” terminal and keyboard Rarely used today
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Once a connection is made with the Unix computer , you will be challenged to enter:

A

both a login identification (use rid) and a password

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

If userid /password combination is valid , you will see:

A

the Unix system prompt for your default Unix shell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

After you initially login to your Unix account, you should:

A

change the password that was initially assigned to your account.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How do u change password?

A

Type command $passwd

enter your current password

enter your new password twice

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Enter any of the three commands at the shell prompt to terminate a Unix session:

A

logout
exit
ctrl+d

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

represents the execution of a program that provides an environment which allows you to interact with the UNIX operating system .

A

shell session

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

To invoked a new shell session, simply:

A

enter the name of the shell to use at the current shell prompt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

If you terminate the current shell session:

A

the previous shell resumes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

If you precede the new shell with the ________ command, then all previously invoked shell sessions disappear .

A

exec

Ex: $exec bash
$exec /bin/bash

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

All OS’s implement a ____ control system, or ______________.

A

file
File system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Unix and most , if not all, others use a _________________________ structure .

A

hierarchical directory tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Within a hierarchical directory tree structure, only two types of entities exist

A

( 1) Directories
(2) Files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

______ are organized under Directories

A

Files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Unix’s tree is relatively ____________.

The top most directory is called _______
and is designated by a:

A

standardized

root

forward slash /

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

First level directories are shown below:

A

root

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Other directories can be created and reside within existing directories under:

A

root /

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

By default/design you always log into your:

A

home directory or login directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Your home directory name will be the same as your:

A

Warhawks userid!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Home directory’s resides under:

A

/home
/home/userid

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

To identify your “present working directory type the command:

A

pwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

is a sequenceof directory names , separated by “, leading to a final directory or file.

A

A pathname or path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

The directory you’re currently in is referred to as the:

A

present working director

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

The systems root directory is ALWAYS:

A

/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

There are two types of paths:

A

Absolute
Relative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

Is always referenced from the root directory

E.g. /home/jdoe/public/assignments

A

Absolute path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

Is always referenced from the “present working directory” directory.

E.g. public /assignments

A

Relative path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

represents the present working directory

represents the parent directory of the present working directory

represents the root directory

represents the user’s directory

A

.(i.e. dot)

..(i.e. double dot)

/(i.e. slash)

( i.e. tilde)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

All ____________ are files but, all files are not ____________!

A

programs
programs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

Files data ->

Programs ->

Data->

A

programs , etc.

executable instructions , binary images , script /macro , “ run on their own “ etc.

text , databases , graphics , audio , etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

To determine the “type” of an unknown file, issue the command:

A

file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

Often, we can determine the “type “ of a file by its _________ filename.extension

The part of the filename to the right of the period is called the:

A

extension

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

With respect to filenames, all alphanumeric characters are acceptable except:

A

@ ‘ | < > ! $ & \ / “ ? [ ] ( ) { } ^ # ;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

The maximum filename length is ______________ including any extension and intervening periods

A

255 characters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

True or false:
Unix in general is not case sensitive

A

False:
Unix is case sensitive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

Any filename, or directory, that begins with a period (.) is called:

A

invisible/ hidden file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

by default not be shown by a directory listing command

A

Hidden files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

Only one file or directory can exist in a directory with a given:

Likewise , a file and a directory cannot share the same ______ in any directory

A

name
name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

Good filename practice include:

A
  1. Use meaningful names
  2. Use “_” instead of spaces
  3. Establish your own naming convention
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

If a file contains text or readable data, then you can display a count of lines, words and characters in the file to standard output without editing it by issuing the command:

A

wc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

4 Command line arguments:

A

c - count bytes
m - count characters
l - count lines
w - count words

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

If a file contains text or readable data, then you can display the entire contents of the file to standard output without editing it by issuing the command:

A

cat

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

Command line arguments:

A

n - line number on outputs
# - number of lines to display
c - clear standard output
i - prompt to overwrite

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

To display the first few lines of the file to standard output without editing , issue the command:

A

head

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

To display the last few lines of the file to standard output without editing, issue the command:

A

tail

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

To display the entire contents of the file to standard output page by page and without editing, issue the command at the shell prompt:

A

more

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

While the more program executes, you can issue several single character commands to interact with the program:

A

q - Quit
f- Move forward through the file Spacebar - move forward through the file .
b - Move backward through the file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

To copy the contents of a source file to a destination file in the present working directory, issue the command:

A

cp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

To copy the contents of a source file to a a new directory where the new file has a new name, issue the following cp command at the shell prompt:

A

cp [-i] srcFile path/destFile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

If the destination file does not exist:

If the destination files exists:

A

a new file is created

then the prior file contents are overwritten

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

To rename a file in the present working directory issue the following command at the shell prompt:

A

mv [-i] srcFile destFile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

To move a file from its present working directory to a new directory issue the following mv command at the shell prompt:

A

mv [-i] srcFile path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

To move a file from its present working directory to a new directory AND rename the file, issue the following mv command at the shell prompt:

A

mv [-i] srcFile path/destFile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

To delete a file in the present working directory, issue the following rm command at the shell prompt:

A

rm [-i] name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
67
Q

To delete a file in any directory, issue the following rm command at the shell prompt:

A

rm [-i] path / name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
68
Q

To list the files and directories under the present working directory” type the (list) command at the shell prompt:

A

ls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
69
Q

If no command line argument, then the ls command lists:

A

all files and directories under the present working directory.

70
Q

4 Directory listing:

A

ls - command line arguments
a - lists all files including hidden
l - long form indicates types, permissions, links, owner, size, create time
d - list information about directory

71
Q

To change to a new present working directory , issue the command:

A

cd

72
Q

5 various cd commands:

A

cd path/name
cd ..
cd ../..
cd ~
cd

73
Q

To create a new directory under any directory, issue the command:

A

mkdir

74
Q

If no path (absolute or relative) is specified, then the directory is:

A

created in the present working directory

75
Q

Creating directories:
m -

p -

A

m- set access(permission) mode
by default media creates the name directory in mode 777

p- create entire path

76
Q

To copy an existing directory under any directory, issue the command:

A

cp

77
Q

To use cp command you must have permission to access ________ and you the permission write in ________

A

nameSrc

dirDest

78
Q

To delete an existing directory under any directory, issue the command:

A

rmdir

79
Q

By default, before you delete a directory:

A

it must first be empty! No files or other directories in it!

80
Q

You can recursively delete a directory, including its files and subdirectories, by issuing the following version of the rmdir command:

A

rmdir -rf [path/] name1…[ path /] nameN

81
Q

The following version of the rmdir command asks you (i.e. interactive ) whether you really want to remove a file or subdirectory during recursive mode:

A

rmdir -ri [path/] name1… [path/] nameN

82
Q

The problem with the previously discussed file commands is that your are required to type filenames exactly

E.g. If you wanted to delete 100 files, then you must do one of the following:

A

Execute 100 rm commands each with a single filename

Execute 1 rm command with 100 filenames

83
Q

will match any string characters.

A

wild card *

84
Q

ls t*

rm a*c

rm *

A

lists all file that begin with a ‘t’ in the present working directory

removes all files that begin with ‘a’ and end in ‘c’

removes all files in the present working directory

85
Q

will work with any command line program, its part of the shell, not a particular program like or rm.

A

The wild card

86
Q

To obtain more information about any Unix command, issue the command:

A

man

87
Q

What if you don’t know the name of a command but have an idea of the function it performs?

This command will query a system database using a keyword to identify an appropriate command .

A

apropos

88
Q

To clear standard output of all text, issue this command:

A

clear

89
Q

PHP is the:

A

PHP hypertext processor

90
Q

PHP was developed by:

When:

A

Rasmus Lerdorf (Apache group/ written in PERL)

In 1995

91
Q

PHP predecessor was:

A

PHP/IF

(Personal home page/ forms interpreter)

92
Q

PHP is primary use is for:

A

server-side scripting

93
Q

PHP scripts can be embedded within:

A

html documents

94
Q

How does PHP work:

A

The server processes the html document

executing the PHP segments

substituting the output within the html document

95
Q

specifies a document at a specific web address (URL) that is desired

A

client

96
Q

If the document is ______ or _____, then the server simply forwards it back to the client

The document is then rendered in the:

A

.html
.txt

client’s browser

97
Q

if the requested HTML doc has embedded PHP or the file is a *.php file, the server:

A

executes the PHP, replacing the PHP code with its output in the document

98
Q

The last step of PHP is that the modified HTML document is then sent to the:

A

Client

99
Q

Will the web client ever actually see PHP code?

A

NO

100
Q

The server may access files whose names ________________, or preprocessing data that it does not want the client to see

A

should not be seen

101
Q

The only reason the client even knows PHP is involved is due:

A

to the file extension .php, but even this is not required if the server is configured correctly

102
Q

PHP, like JavaScript , is a:

A

fully functional programming language

103
Q

PHP has an incredible number of built-in features , including:

A

-Forms processing
-Output / generate various types of data ( not just text)
-Database access
-Object-oriented features

104
Q

Within an HTML document or PHP document, the “<?php” until “?>”part is called:

We can call any part of the file between “<?php” and “?>” the:

A

processing instruction

PHP portion

105
Q

All PHP programs have access to a large number of:

A

predefined variables

106
Q

These variables allow the script access to server information, form parameters environment information, etc

A

Predefined variables

107
Q
  • An array containing much information about the server
  • An array containing variables passed to a script via HTTP POST
  • An array containing cookies
A

$_SERVER

$ POST

$_COOKIE

108
Q

is a PHP built in function that returns information about the PHP server, including information about the predefined variables

A

phpinfo();

109
Q

All PHP statements must be followed by a:

A

semicolon

110
Q

There are three styles of comments in a PHP program:

A

the rest of a line is a comment

// the rest of the line is a comment

/* this is a comment * /

111
Q

PHP provides two language constructs to output to the screen:

A
  1. print()
  2. echo()
112
Q

For print and echo the ___ can be omitted

Both prints out it’s argument which is a:

A

()
String

113
Q

What is the difference between echo and print?

A

echo has been shown to execute slightly faster than print

114
Q

There exist four commonly used PHP scalars (data types ):

A
  1. Boolean
  2. Integer
  3. Float
  4. String
115
Q

Could call it a double since we don’t declare variables, this works:

A

Float

116
Q

Double quoted allows for more escape sequences and allows variables to be:

A

interpolated into the string

117
Q

What does “interpolated into the string” mean?

A

rather than outputting the name of the variable, we output its contents

118
Q

All PHP variables names begin with:

After that, variable names can begin with:

Otherwise rules are similar to most other languages

A

$
underscore

119
Q

PHP Variables

Variables are:

No type:

Variables are _________ or __________

Type information is obtained from the:

A

dynamically typed

declarations

BOUND or UNBOUND

current bound value

120
Q

Division (/) in PHP is always floating point division! To get integer division , we must:

A

cast to int

121
Q

The inequality operators(>=, <=)do not compare strings. Instead, they will cast strings into __________ before comparing

To compare strings , use the C-like string comparison function:

A

numbers

strcmp()

122
Q

Comparing a string and an int

Any non-numeric PHP string value will equal:

Any numeric PHP string will equal:

A

0

the number it represents

123
Q

Comparing a string and a Boolean

A regular PHP string value will “equal”:

“0” string will equal:

A

true

false

124
Q

PHP allows for an alternative syntax to designate a block in the:

A

if,
while ,
for
and switch statements

125
Q

is a set of protocols implemented by Web servers that interact with web browsers

A

Common Gateway Interface (CGI)

126
Q

is used to allow data transfer between the client and the server

A

CGI

127
Q

Two best known CGI methods:

A
  1. GET
  2. POST
128
Q

Appends the user’s input to URL And the server parses the URL

A

GET

129
Q

Sends data as a stream to action program. Is more suitable for large amounts of data. Arguments are not shown in URL address

A

POST

130
Q

GET and POST are both used within _______ forms

The user enters data into the form and then _________ the form

A

HTML

Submits

131
Q

When forms are submitted, the server executes the _________, returning the resulting _______

A

PHP script

html

132
Q

Servers can be set so that the form variables can be accessed directly by simply using the:

A

$ sign

133
Q

While using the $ sign would suffice it is better to access the variables from the _______ array or the _______ array

A

$_POST

$_GET

134
Q

We can also use PHP to create _______. However, it is really just HTML that we are creating.

A

forms

135
Q

What is XML?

When was it developed?

A

eXtensible Markup Language that is a simplified version of SGML

1990s

136
Q

What is the current standard of XML?

A

W3 consortium

137
Q

SGML and XML are similar but there are a few differences:

A

XML is widely used

SGML is not so widely used

138
Q

XML was designed to __________ data and to focus on what data ___

XML is about ___________ data!

XML is __________!!!

A

describe/is

describing

passive

139
Q

HTML was designed to ________ data and to focus on how data _______

HTML is about ____________ data!

HTML is ________!!!

A

display/looks

displaying

active

140
Q

XML _______ designed to describe data!

XML ________designed to display data!

XML ________ a replacement for HTML!

A

was

was not

is not

141
Q

5 reasons to use XML:

A
  1. Separates data from display
  2. A means to store and exchange data between applications
  3. Repurpose data in multiple formats
  4. Create new markup languages
  5. Validate document content
142
Q

XML is designed to be a __________ way to ___________________ between applications or store information

A

portable

exchange information

143
Q

XML provides the means to create _________________ that you will use to move data between the applications you create

A

containers (i.e. files)

144
Q

Is a direct derivation of XML

A

XHTML

145
Q

For all XML applications, the __________ data will be stored in a database.

A

Original

146
Q

Other markup languages are also XML derivations such as:

A

Bioinformatics Sequence Markup Language(BSML)

Mathematical Markup Language(MathML)

Chemistry Markup Language CML

147
Q

A generic tool known as an ___________ can validate that documents (“instances) contain what they are supposed to contain.

A

XML parser

148
Q

There are now many XML “spin-off standards

___________for defining the contents of XML documents exactly

___________for style sheets and transformation

A

XML Schema

XSLT

149
Q

XML is a _____________, which allows you to describe a set of “ elements “ ( i.e. tags or markers ) in a textual document to give it a structure that can be “ processed “

A

meta-language

150
Q

XML elements have the following structures:

A

<element> content </element>

OR

<emptyElement></emptyElement>

151
Q

XML can refer to TWO types of files, both of which describe the “element” set (i.e. the structure ) of an XML document:

A
  1. Document Type Definition (DTD)
  2. XML Schema
152
Q

Element __________ can include other elements

A

content

153
Q

All XML documents (“XML instances”) contain one:

A

top-level element

154
Q

Recall the ________ is top-level element in all HTML documents

A

<html>
</html>

155
Q

An element can have many attributes, and they can be __________ or __________

Element names and attribute names are:

A

required or optional

case-sensitive

156
Q

You could choose to define the header using XML attributes instead of an:

This choice is made when designing the XML document type, and is typically driven by considerations of how the data will be:

A

sub-elements

processed

157
Q

An XML document is said to be ___________ if it conforms to the seven rules shown on the next slides

A

well- formed

158
Q

An XML document is said to be valid if it is ____________ AND __________ to the user-defined content rules in a Document Type Definition or XML Schema

A

well-formed
conforms

159
Q

defines the allowable elements for an XML document:

provide functionality similarly, but is more powerful:

A

Document Type Definition (DTD)

XML Schema

160
Q

Valid implies:

XML document can be _________, yet not valid

A

Well-formed

Well-formed

161
Q

Can an XML instance contain elements from two or more XML documents definitions?

A

Yes !!!

However, we need to address the issue of XML namespaces to make sure element name conflicts do not occur

162
Q

What is the solution to element name conflicts?

A

Solution: Name Prefix

Preceded each “conflict” element name with a name prefix

namePrefix:elementName

163
Q

if you use name prefixes, you must also define a __________ for each name prefixes you use

A

namespace

xmlns:namePrefix=“URI”

164
Q

defines the location of an XML document definition

A

namespace

165
Q

The Uniform Resource Identifier (URI) can be one of the following:

A

Uniform Resource Name (URN)
Uniform Resource Locator (URL)

166
Q

allow you use elements from two or more XML document definitions, and avoid element name conflicts

A

XML namespaces

167
Q

used to define DTD elements:

used to defined DT element attributes:

A

<!ELEMENT …>

<!ATTLIST …>

168
Q

means the string of character data is passed by the parser to an application unmodified

A

CDATA

169
Q

means the string of character data may contain parsed character data; E.g. <, >, &

A

PCDATA

170
Q

specifies the element attribute is optional

specifies the element attribute is required

A

IMPLIED

171
Q

specifies the element attribute (if present) must have the given this value

If the element attribute is not present, this value will be used.

A

FIXED