Chapter 9 Writing Scripts, Config Email and using Databases Flashcards

1
Q

Display

A

This variable identifies the display used by the X windows server. It’s usually set to :0.0, which indicates the first display on the current computer. You ccan run Multiple X Sessions on one computer in which case each one gets a different DISPLAY number- for instance, :0.0 for the first session and :1.0 for the second session.

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

Editor

A

Some programs launch the program pointed to by this enviorment variable when they need to call a text editor for you to use. Thus, changing this variable to your favorite editor can help you work in linux. It’s best to set this variable to a text-mode editor because GUI editors may cause problems if theyre called from a program that was launched from a text mode.

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

This varible determines the number of commands that will be saved in your history file.

A

HISTSIZE

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

This variable points to your home directory. Some programs use it to help them look for configuration files or as a default location in which to store files.

A

HOME

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

This is the current TCP/IP hostname of the computer.

A

HOSTNAME

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

A Few programs use this environment variable to indicate directories in which library files may be found. It works much like PATH

A

LD_LIBRARY_PATH

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

The system holds your current language, specified as a locale,using this variable. Locales are describes further in Ch 6 “config the X Windows Systems, Localization and Printing”

A

LANG

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

This variable holds your username when you are logged into the system.

A

LOGNAME

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

This variable holds the location of the user’s mail spool. It usually /var/spool/mail/username

A

MAIL

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

If set, this variable determines the pager to use for output by programs, such as man

A

PAGER

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

This is the default prompt in bash. It generally includes. It generally includes variables of its own, such as \u (for the username), \h (for the hostname) and \W for the current working directory) This value is frequently set in /etc/profile, but users often over ride it.

A

PS1

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

This is the present working directory. The enviorment variable is maintained by the system. Programs may use it to search for files when you dont provide a complete pathname.

A

PWD

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

The variable holds the path to the current command shell.

A

SHELL

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

You can set this enviorment variable to your own time zone, which is the most useful if thats different than they computers time zone- for instance, if your using a computer remotely.

A

TZ

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

User or Username

A

This is your current username. Its variable thats maintained by the system.

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

is parameter is what you want to type at the command prompt, and the shell substitues command for whatever you type.

A

alias_name

17
Q

Vocab

is a variable defined by a user for various pruposes, such as temporarily storing data.

A

user defined variable

18
Q

Explain the function of enviorment variables

A

Enviorment variables are used to store information on the systems for the benefitws of running programs. Examples include the pathenviorment variable, which holds the locations of executable programs and HOSTNAME which holds the systems hostname.

19
Q

Describe various shell script components?

A

A shell script combines several commands, possibly including conditional expressions, variables, and other programming features. A shell script must start with a shebang line to let the kernel know its a script and indicate the shell interperter to use. Each script component has a specific syntax needed for proper shell execution and logic flow. A shell script is run using vatious methods. Each method may or may not create a subshell and may or maynot require the execution bit to be set.

20
Q

Describe the prupose of shell aliases?

A

aliases enable you to create a command “shortcut” a simple command that can stand in for different or longer command. Aliases are typically defined in a shell startup scripts as a way to create a shortened version of a command. aliases also allow useful command options to be used as the new default or they create an easier to remeber verstion of a command.

21
Q

Summarize the major SMTP servers for linux

A

Sendmail was the most common SMTP server a decade ago, and it is still very popular today. Postfix and Exim are often supplied as the default mail servers on modern distributors, whereas administrators soetimes install qmail. Postfix and qmail use modular designs,whereas sendmail and Exim do not.

22
Q

Summerize the structure of a SQL Database?

A

Each SQL instllation consists of a numver of naed databases, each of which in turn may contain miltiple tables. Each table can be thought of as two dinensional array of data. Each row in a table describes some object or concept(inventory,employees,movies in a personal DVD collection and so on and each column in a table holds data about these objects or conceptys(model number,salary or director for example.

23
Q

Describe the commands used to enter in a SQL Database?

A

The INSERT command inserts a single entry into a database. It requires a table name and set values, as in INSERT ITO Moves VALUES(‘Brazil’, “terry Gilliam’, 1985); The update command can be used in a similar way to update an existing entry, but you must use SET to specify the column to set and WHERE to identify the row or rows to be modified.