Shared Flashcard Set

Details

CGS 3767 by Tiana Solis Exam 3 ch 7-9
CGS 3767 by Tiana Solis Exam 3 ch 7-9
88
Computer Science
Undergraduate 3
02/29/2012

Additional Computer Science Flashcards

 


 

Cards

Term

(Choose all that apply)

A file extension ___

 

a. is required in both the Windows 7 and Fedora operating systems

b. is usually three letters and comes after the comma

c. is usually three letters and comes after the period

d. typically suggests the type of data in the file

e. is used by the OS to determine which program could be used to process the file

Definition

c. is usually three letters and comes after the period

d. typically suggests the type of data in the file

e. is used by the OS to determine which program could be used to process the file

Term

File associations ___

 

a. specify certain aspects of the operating system's treatment of different directories

b. specify the operating system that you are using

c. refer to left-over information that does not help you

d. specify certain aspects of the operating system's treatment of different file types

e. are only used in the Windows 7 OS

Definition

d. specify certain aspects of the operating system's treatment fo different file types

Term

(Choose all that apply)

When working with files, knowing the file extension helps you ___

 

a. determine if you need to load the application to read or updade the file

b. determine the value of the file before you begin working with it

c. determine the correct compiler to use

d. troubleshoot problems you may encounter with downloaded files from the internet

e. in no way; it is only for decorative purposes

Definition

a. determine if you need to load the application to read or updade the file

c. determine the correct compiler to use

Term

In Fedora, file extensions ___

 

a. are required

b. are not necessary because the OS can read the file header to check  for the file type

c. are identical to those used in the Windows 7 OS

d. do not help in determining the contents of the file

Definition

b. are not necessary because the OS can read the file header to check for the file type

 

Term

(Choose all that apply)

To view a file in Fedora, use the ___ command.

 

a. FIND

b. cat

c. find

d. more

e. less

Definition

b. cat

Term

(Choose all that apply)

The cat command displays a file's contents ___

 

a. by concatenating them to the standard output device or another file

b. and requires a file operand to do so

c. and can use the redirection symbol >

d. one page at a time when the more command is also used

Definition

a. by concatenating them to the standard output device or another file

c. and can use the redirection symbol >

d. one page at a time when the more command is also used

Term

Every file in DOS has ___ attributes

 

a. 1

b. 2

c. 3

d. 4

Definition

d. 4 (read-only, archive, system, and hidden)

 

Term

Use the more command to ___

 

a. copy file contents

b. determine file attributes

c. view file contents

d. view hardware configuration

Definition

c. view file contents

Term

(Choose all that apply)

The hidden attribute ___.

 

a. causes your files to become invisible

b. cannot be seen unless you use the DIR UNHIDE command

c. is used to prevent a file from being seen by other commands

d. is not listed by the DIR command by default

Definition

a. causes your files to become invisible

c. is used to prevent a file from being seen by other commands

d. is not listed by the DIR command by default

Term

Use the ___ command to view attributes in DOS

 

a. VIEW

b. FIND

c. ATTRIB

d. FILE_ATTRIB

Definition

c. ATTRIB

Term

(Choose all that apply)

Compressing files ___

 

a. decreases a file's size

b. decreases the amount of space used by all the files stored within a folder

c. may result in a loss of performance

d. is not recommended and should not be considered

e. cannot be done prior to encryption

 

Definition

a. decreases a file's size

b. decreases the amount of space used by all the files stored within a folder

c. may result in a loss of performance

e. cannot be done prior to encryption

Term

(Choose all that apply)

Encryption of files ___

 

a. cannot occur if the files are compressed

b. is the same as compression

c. prohibits other users from viewing the contents of encrpted files

d. is not available in Windows 7

e. is used to decrease file size

Definition

a. cannot occur if the files are compressed

c. prohibits other users from viewing the contents of encrypted files

 

Term

(Choose all that apply)

File attibutes in Fedora ___

 

a. are different from those in Windows 7

b. are seldom used

c. can be viewd with the lsattr command

d. are the same as those in Windows 7

Definition

a. are different from those in Windows 7

c. can be viewed with the lsatttr command

 

Term

(Choose all that apply)

A regular expression ___

 

a. uses literal characters and metacharacters

b. is a notation for specifying patterns of text, as opposed to exact strings of characters

c. is helpful when searching for eact text matches in an ASCII file

d. example is "[A-C]"

Definition

a. uses literal characters and metacharacters

b. is a notation for specifying patterns of text, as opposed to exact strings of characters

Term

Use the ___ command to search for an exact text match in an ASCII file

 

a. find

b. SEEK

c. SEARCH

d. FIND

e. FINDSTR

Definition

e. FINDSTR

Term

The DIR command in Windows 7 is similar to the ____ command in Fedora

 

a. find

b. more

c. file

d. ls

Definition

d. ls

Term

(Choose all that apply)

Which standard search criteria can you use with the Windows 7 Search feature?

 

a. all of a file name

b. part of a filename

c. date

d. author

Definition

a. all of a file name

b. part of a filename

c. date

d. author

Term

(Choose all that apply)

When using the Windows 7 Search feature, which of the following criteria can you use to narrow your search?

 

a. date modified

b. author

c. program

d. size

Definition

a. date modified

b. author

c. progarm

d. size

Term

VIM has 2 modes, what are they?

Definition

INSERT mode and ESCAPE mode

Term
How do you access the INSERT mode in vim?
Definition
press i when you are in ESCAPE mode
Term
How do you access the tutorial in vim?
Definition
vimtutor
Term
How do you quit vim?
Definition
type :q in ESCAPE mode
Term
#! does what
Definition
begins the script
Term
# does what?
Definition
indicates comments
Term
expr stands for what?
Definition
expression
Term
echo $? does what?
Definition
tells you if the result is successful. 0 = successful
Term
sh filename or ./filename does what?
Definition
runs filename in Linux
Term
echo $SHELL does what?
Definition
shows the shell that you are using
Term
What does the command interpreter do?
Definition
it executes commands
Term
% is used in ____
Definition
Windows
Term
$ is used in ___
Definition
Linux
Term
> is redirect. What is >>?
Definition
append
Term
/? does what?
Definition
calls help
Term
$ is used in which OS?
Definition
Linux
Term
% is used in which OS?
Definition
DOS/command line
Term

What does this mean?

if [ -d $1 ]

Definition
if directory then run argument
Term
Scripts must have ___ as their first line
Definition
#!/bin/sh, sh can be any shell
Term
What are the two types of errors?
Definition
symmantic and syntax
Term
what kind of statement can provide flow control?
Definition
IF, FOR, and GOTO statement
Term
The two types of variables are?
Definition
local and environment
Term
How to do comments in Windows scripting?
Definition
REM and ::
Term
set /p n=enter an integer number, n will hold what?
Definition
the user input
Term
anything in " " will be replaced by its ____.
Definition
value
Term
Anything in ' ' will be displayed as a ____
Definition
string
Term
Anything in ` ` will display _____
Definition
the result of a calculation
Term
tail displays what?
Definition
the last 10 lines of the file
Term
head displays what?
Definition
the first 10 lines of a file
Term

(Choose all that apply)

You use the find command in Fedora to search for ___

a. text within a file

b. directories

c. links

d. files based on file type

Definition

b. directories

c. links

d. files based on file type

Term

You use the grep command in Fedora to earch for ___

a. text within a file

b. directories

c. links

d. files based on file type

Definition

a. text within a file

Term

(Choose all that apply)

Text editors are used to ____

a. edit files

b. create files

c. execute files

d. compile files

Definition

a. edit files

b. create files

Term

(Choose all that apply)

Common text editors include ___

a. DOS Edit

b. Vim editor

c. Windows 7

d. TextPad

Definition

a. DOS Edit

b. Vim Editor

d. TextPad

Term

Learning DOS Edit prepares you to use ___

a. TextPad

b. The Vim editor

c. Windows 7

d. No editor is compatible

Definition

b. The Vim editor

Term

(Choose all that apply)

Common File menu options in DOS Edit are ___

a. Find

b. Save

c. New

d. Exit

Definition

b. Save

c. New

d. Exit

Term

(Choose all that apply)

Common Edit menu options in DOS Edit are ___

a. Clear

b. Copy

c. Cut

d. Paste

Definition

a. clear

b. Copy

c. Cut

d. Paste

Term

(Choose all that apply)

Copy, cut, and clear commands require ___

a. text of more than three characters

b. the use of Edit mode

c. highlighting

d. special characters

Definition

c. highlighting

Term

(Choose all that apply)

TextPad is ___

a. similar to DOS Edit

b. a powerful word processor

c. a full featured text editor

d. a Windows 7 text editor that is easy for new users to learn

Definition

c. a full featured text editor

d. a Windows 7 text editor that is easy for new users to learn

Term

(Choose all that apply)

You can use TextPad to ___

a. create and edit text documents

b. create and edit computer programs

c. run Java applications

d. compile Jave programs

Definition

a. create and edit text documents

b. create and edit computer programs

Term

(Choose all that apply)

The windows clipboard can be used with the Copy, Cut, and Paste commands to ___

a. copy text within a text file edited in DOS Edit

b. cut text within a text file edited in TextPad

c. copy text from a text file edited in TextPad to another windows application

d. copy text ithin a text file edited in DOS Edit to a file edited in Vim

Definition

b. cut text within a tet file edited in TextPad

c. copy text from a text file edited in TextPad to another windows application

Term

(Choose all that apply)

You can use the Vim editor to ___

a. create and edit text documents

b. create and edit computer programs

c. run Java applications

d. compile Java programs

Definition

a. create and edit text documents

b. create and edit computer programs

Term

(Choose all that apply)

Which of the following is a mode in the Vim editor?

a. Insert

b. Visual

c. Edit

d. Application

Definition

a. Insert

b. Visual

c. Edit

Term

(Choose all that apply)

To save a file in the Vim editor, type ___

a. :w

b. :wq

c. :s

d. :wtf

Definition

a. :w

b. :wq

Term

(Choose all that apply)

Which of the following editors work with a mouse?

a. DOS Edit

b. TextPad

c. The Vim Editor

d. all of the above

Definition

d. all of the above

Term

To close a file in the Vim editor, you must first be in ___ mode before you type the quit command

a. Edit

b. Visual

c. Insert

d. The mode does not matter

Definition

a. Edit

Term

To move from Insert mode to Edit mode in he Vim editor, press the ___ key

a. i

b. insert

c. enter

d. esc

 

Definition

d. esc

Term

(Choose all that apply)

In TextPad, which of the following are options for viewing multiple files?

a. Horizontal

b. Vertical

c. Cascaded

d. Hidden

Definition

a. Horizontal

b. Vertical

c. Cascaded

Term

(Choose all that apply)

To save C++ files in TextPad for compiling in Fedora ____

a. choose the C++ option in the Options menu

b. just sae them like any other files

c. select UNIX from the file format list box

d. select program from the file format list box

Definition

c. select UNIX from the file format list box

Term

(Choose all that apply)

Use the :split command in the Vim editor to ___

a. divide your time between assignments

b. view multiple files at one time

c. use one buffer between multiple files to store cut for copied texts

d. create files without closing the file you are working on

 

Definition

b. view multiple files at one time

d. create files without closing the file you are working on

Term

(Choose all that apply)

You can use regular expressions to ___

a. search for strings

b. search and replace strings

c. make mathematical calculations

d. make complex comparisons

Definition

a. search for strings

b. search and replace strings

Term

(Choose all that apply)

Why should you use te CLI?

a. It offers a faster way to perform a task, such as renaming multiple files

b. It may inspire you to stay away from computer programming

c. it uses fewer resources than the graphical user interface

d. it allows you to create powerful, multifaceted commands

Definition

a. It offers a faster way to perform a task, such as renaming multiple files

c. it uses fewer resources than the graphical user interface

d. it allows you to create powerful, multifaceted commands

Term

The command history is ___

a. a historical document of a virtual machine's specifications

b. useful if you need to recall a previously used command

c. nonexistent in Fedora

d. unreliable and should be used with caution

Definition
b. useful if you need to recall a previously used command
Term

(Choose all that apply)

The man pages in Fedora display ___

a. the synosis of a command

b. the description of a command

c. the known bugs associated with a command

d. options you can use with a command

Definition

 

a. the synosis of a command

b. the description of a command

c. the known bugs associated with a command

d. options you can use with a command

Term

Which of the following commands should you use in a Fedora script to print the last bytes of a file?

a. tail

b. last

c. lastbytes

d. head

Definition

a. tail

Term

Use the ___ command to place comments in Windows 7 batch files

a. #

b. /

c. Comments:

d. REM

Definition
d. REM
Term

In its basic form, the grep command in Fedora ___

a. prints to the standard output device

b. erases data from a file

c. searches a file for a particular pattern

d. appends data to a file

Definition
c. searches a file for a particular pattern
Term

(Choose all that apply)

Environmenta variables are classified as ____

a. user

b. system

c. character

d. fundamental

Definition

a. user

b. system

Term

By default, the head command in Fedora ___

a. provides a detailed description of the header record

b. onl outputs the first, or head, record

c. outputs the first 10 lines

d. only works with the tail command

Definition
c. outputs the first 10 lines
Term

(Choose all that apply)

You can use the SET command in Windows 7 to ___ environmental variables

a. print

b. create

c. remove

d. display

Definition

b. create

c. remove

d. display

Term

(Choose all that apply)

The six step problem solving process ___

a. helps provide a solution to a problem

b. cannot be used to write scripts

c. helps organize information to provide solutions

d. can be adapted to any set of problems

Definition

 

a. helps provide a solution to a problem

c. helps organize information to provide solutions

d. can be adapted to any set of problem

Term

(Choose all that apply)

a. temporarily stop the program to keep it fom going out of control

b. temporarily stop the program to ask a question

c. permanently stop the program from executing from that point

d. provide a point of escape for the program

Definition

a. temporarily stop the program to keep it fom going out of control

d. provide a point of escape for the program

Term

(Choose all that apply)

scripts or batch files are writen to ___

a. organize commonly used commands

b. provide complex logical statements that maintain files

c. provide more work

d. use specific commands

Definition

a. organize commonly used commands

b. provide complex logical statements that maintain files

d. use specific commands

Term

(Choose all that apply)

To display the contents of a file in Windows 7, you can use the ___ command

a. SET

b. REM

c. PRINT

d. TYPE

Definition

c. PRINT

d. TYPE

Term

(Choose all that apply)

To display the contents of a file in Fedora, you can use the ____ command

a. cat

b. head

c. tail

d. less

Definition

a. cat

d. less

Term

Which of the following symbols do you use to redirect output from a screen display to a file in Windows 7 or Fedora?

a. <

b. >

c. ->

d. <-

Definition

b. >

Term

Which of the following symbols do you use to redirect input from afile to a screen display in Windows 7 or Fedora?

a. <

b. >

c. ->

d. <-

Definition

a. <

Term

Which command should you use to perform branching within a batch program in Windows 7?

a. BRANCH

b. GO

c. GOTO

d. TO

Definition

c. GOTO

Term

(Choose all that apply)

Which of the following file extensions can you use on batch program files in Windows 7?

a. .exe

b. .cmd

c. .bat

d. .sh

Definition

 

a. .exe

b. .cmd

c. .bat

Term

Which of the following file extensions can you use on scripts in Fedora?

a. .exe

b. .cmd

c. .bat

d. .sh

Definition

d. .sh

Term

(Choose all that apply)

Which of the following are considered filter commands in Windows 7?

a. FOR

b. FIND

c. MORE

d. SORT

Definition

 

b. FIND

c. MORE

d. SORT

Supporting users have an ad free experience!