• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/93

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

93 Cards in this Set

  • Front
  • Back
What directory contains all the files needed by the system for initial startup?
/boot
What command will create a new directory called sourcefiles?
mkdir sourcefiles
After the chmod 600 sample command has been executed (where sample is a directory):



Access privileges for sample are set to read and write for the owner


Nobody other than the owner can perform any operations on sample


The cd sample command would report an error message, Permission denied (or somethingsimilar)

All of the above, Removing the execute bit to a directory makes it unsearchable.
The absolute pathname of a file in Linux starts with the
Root directory on the system
File access permissions include:
read, write, and execute
What command will allow you to remove a link to a file?
rm
The output of the command: ls -l produces information about each file in the working directory including:



file name, file size, and time.


file type, link count, and date.


owner and owner's group.

All of the above, file name, file size, and time, file type, link count, and date, owner and owner's group.
If a file to which a soft link exists is deleted, what happens?
The soft link points to a nonexistent file
A file with the following permissions: rwxr-xr-x



is readable by all users.


is writeable by the owner only.


is executable for other users.

All of the above
If a user (not the owner or a group member) can use cd to change to a directory such as /home/rbass/studentstuff; and use ls to view the files in the directory; what permissions must be set?
Read and execute for other users.
For a directory, users granted read and execute permissions are allowed to:
read the directory's contents.
Which type of link can be used to create a directory entry to a file in another file system?
Soft links are used to link files across file systems.
The set-user-ID bit (SUID) allows an executable file to:
Assume owner persmissions
What is the most common and preferred method of sharing files among selected Linux/UNIX users?
links
After creating a hard link to a file, the original file is deleted, what happens to the hard link?
The original file name is deleted but the hard link still points to the file.
A hard link is:
A pointer to the inode of an existing file.
The root user has the authority to:



delete all user accounts (including management personnel) on the system without priornotification.


delete any file on the system including those, that if deleted, would make the system inoperable.


change or remove any password on the system without prior notification of the user.


all of the above


None of the above.

all of the above
An inode in Linux
is the control structure for a file.
File access permissions are grouped into the categories:
user, group, and others.
The shell expands the characters: ~/ (a tilde followed by a slash) at the start of a pathname
into the pathname of your home directory
The ls -l ~ displays the long listing of all the files in your
Home directory denoted by the ~.
When a user is given execute permission for a directory, he/she may:
search it
If you want to set all three special access bits (SUID, SGID, and sticky) for the sample file and set the rest of its access bits to 754 with one command:
You need to execute the chmod 7754 sample command
What command will create a soft link named: "mypass" to /etc/passwd?
ln -s /etc/passwd mypass
A permission value of 764 for the sample file means that:
All of the above, Owner of sample can read, write, or execute sample, Users in owner s group can read or write sample, Everyone else can read sample
The command: chmod 600 sample :
Takes away all privileges from the group users
To dereference a symbolic link means:
to follow the link to the target file.
Which command creates a link?
ln
If myprograms is a directory, what does the command:



rm -r ~/myprograms




do?

recursively deletes files including any subdirectories in myprograms, and then deletes the directory myprograms.
For the cp file1 ~/dir1/dir2 command to successfully copy file1 into ~/dir1/dir2, you must have:
Read access for file1, execute access for ~, dir1, and dir2, and write access for dir2
The inode number of a file in LInux is
Unique for every file
A identity of the current working directory can be displayed with what command?
pwd
If you have any empty directory called ~/backups, you can copy directory ~/courses into it by using the following command:
cp -r ~/courses ~/backups
The set-user-ID bit (SUID) allows an executable file to:
take on the privileges of the owner of the file when it executes.
For the file with the name: solid, which of the following is not a valid use of the chmod command?



chmod 777 solid


chmod ugo-rwsolid


chmod a+x solid


chmod solid +read

chmod solid +read
What command will change the working directory to /home/rbass/sourcefiles?



chdir /home/rbass/sourcefiles


cd /sourcefiles


cd /home/rbass/sourcefiles


cdir /home/rbass/sourcefiles

cd /home/rbass/sourcefiles
What types of files are candidates for having the execution access permissions set for users?
script files.
In the output of the ls -l sample command, the leftmost three letters indicate the:
Type of file and state of read and write privileges for the owner of sample
Which of the following commands will remove all access permissions to file: sample for the group and others?


chmod go=rwx sample


chmod a-rwsample


chmod go= sample


chmod a= sample

chmod go= sample
Linux supports the following file types:
Ordinary file, directory, link file, block special file, character special file, named pipe (FIFO), and socket
What is a soft link?
A soft link is a new file with the path name to the original file.
What is the result of the following command? chmod 700 myfile
sets access privileges for myfile to read, write, and execute for the owner.
The relative pathname of a file in Linux
locates a file relative to the current working directory.
The output of the command: ls -l produces information about each file in the working directory including:


file name, file size, and time.
file type, link count, and date.
owner and owner's group.
all of the above.

all of the above.

What is the purpose of the "--help" option lists the hardware devices available for use with the command.


provides error messages that assist in debugging if a command fails.
provides interactive assistance with a command as it executes.
None of the above

None of the above

Given the command:
cat ?[xyz]*.cpp
which of the following files with be displayed?


Myfile.cpp
Xyz.cpp
9zjunkfile.cpp
All of the above.
None of the above.

All of the above.

A command that reads its standard input from the output of another command; and, writes its standard output to the standard input of another command is called:


a redirect
a filter
a link
All of the above.
None of the above.

a filter

In the following Linux command, which is the command argument?


ls -al m*


m*
-al
ls
None of the above.

m*

What is the shell special character that creates a pipe between commands?


Greater than sign (>)
Less than sign (<)
Tilde (~)
Colon (:)
None of the above

None of the above

The command:
ls program[12345]
can generate which of the following lists of filenames?


program1 program2 program3.cpp program.2
program1 program2 program5
program1 program3 programX
program5 program3 program1 program9

program1 program2 program5

Which of the following commands is executed in the background?


find / -name memo55 > mem.out &
ls -al / | grep root > rootsFiles ?
find ~ -name rbass > mystuff <2 background
None of the above.

find / -name memo55 > mem.out &

What command will terminate process 18228 which is running in the background?


del 18228
rm 18228
kill [18228]
kill 18228

kill 18228

Which command will append file extra to customers?


append extra to customers
cat extra >> customers
cp customers extra to customers
mv customers extra to customers

cat extra >> customers

Which file will not be displayed with the following command?


cat page[134589]*
page3
page1
page6
page9
None of the above.

page6

What character is used to separate elements on the Linux command line?


spaces and tabs
hypens
asterisks
All of the above
None of the above

spaces and tabs

What is the output of the jobs command?


A list of all running processes.
A list of suspended jobs and background jobs.
a list of jobs scheduled to be run.
a list of the jobs executed by the user during the current work session.

A list of suspended jobs and background jobs.

The command:
ls ~/*
will list:


all files in the user's working directory
all files in the user's home directory.
all files in the user's home directory except hidden files
all files in the user's working directory except hidden files.

all files in the user's home directory except hidden files

What is a LInux shell?


A program which interprets and executes user commands.
A program which uniquely identifies the variant of Linux running on a computer
A primitive predecessor to a graphical user interface
The LInux users command library.

A program which interprets and executes user commands.

Where is the output of the following command displayed?


cat file1 | grep rbass > /dev/null
the output disappears without a trace.
the output is redirected to file null in directory /dev
since the output is redirected before /dev/null is opened, it appears on stdout.
None of these.

the output disappears without a trace.

If a command is a simple file name, the shell will search:


the directories listed in the PATH variable.
the directories in the path to the working directory and including the working directory.
the working directory, the /usr/bin directory, and the /bin directory.
All of the above.

the directories listed in the PATH variable.

The command:
ls -al | less
is an example of ___________________.


output redirection
pipleline
input redirection
file extending

pipleline

What is the shell special character that matches zero or more characters?


Square brackets [ ]
Pound sign (#)
Dollar sign ($)
Asterisk (*)
None of the above

Asterisk (*)

The question mark (?) is a special character that cause the shell to:


generate a help screen associated with a specific command.
generate an interactive use of the command it is used with.
generate filenames which match any single character in the name of a file.
generate filenames which match any number of characters from 0 to 99 in the filename.

generate filenames which match any single character in the name of a file.

What command will send page1, page2, page3, page4, page5, and page6 to the local printer?


lpr *[123456]
lpr page?
lpr p*
lpr p*[123456]
All of the above.

All of the above.

When interpreting your commands, the shell assumes the first word you type on the command line is


a valid command name or program.
a valid command option to a command.
an argument for the command.
the correct path to the command.
None of the above

a valid command name or program.

The
who | sort > grep
command:


Sorts the output of who and creates a file called grep.
Generates an error since grep is a reserved word.
Redirects the sorted version of the who command to the grep utility.
None of the above

Sorts the output of who and creates a file called grep.

What are the two types of shell commands?


shell builtins and and stand alone utilities
utility and program calls.
file references and device calls
hardware manipulators and software.

shell builtins and and stand alone utilities

Which ls command option will display hidden files?


-h
-all
-a
None of the above.

-a
In Vim, how can you view the files in your home directory without exiting the editor?


enter the command :/ls $HOME
enter the command :!ls ~
enter the command :shell the do an ls command.
none of the above.

enter the command :!ls ~

What is the name of the startup file which sets the parameters for vim?


.bash_profile
.bashrc
VIMINIT
.vimrc

.vimrc

Which of the following best describes what an editor buffer is?


A disk file
A temporary storage area for text you are editing
A protective shell between vim and malicious software.
A brief delay between data entry and storage in memory.
None of the above

A temporary storage area for text you are editing

To insert a blank line below the line the cursor is on in the vim work buffer, the command is:


A
i
$a
o

o

Which command is used to delete the character before the cursor location in vim editor?


x
X
d
D

X

What are the vim modes of operation?


command, escape, and append.
command, last line, and insert
input, command, and visual
last line, insert, and execute

command, last line, and insert

What does the vim command:
:1,$s/ten/10/g
do?


Replaces every occurrence of ten with 10 from line 1 to the current line.
Replaces every occurrence of the string ten with with the string 10.
Searches for the first occurrence of ten on line 1 and replaces it with 10.
Searches for the first occurrence of ten on line 1 and replaces it with 10.
Searches for the first occurrence of ten on line 1 and replaces it with $10.

Replaces every occurrence of the string ten with with the string 10.

What vim command restores text that you just deleted?


u
:undo
Control-U
:r

u

The vim period (.) command:


cause the last command to be undone.
moves the cursor to the top of the buffer.
repeats the last command.
None of the above.

repeats the last command.

Which one of the following statement is not true?


vim editor is the improved version of vi editor
vim editor commands are case sensitive
vim editor has three modes of operation: command mode, last line mode, and insert mode
vi stands for virtual editor

vi stands for virtual editor

What vim command searches the current line in the buffer for big and replaces it with large?


:s/big/large/
:s/large/big/
:s/big/:r/large/
:/s/big/r/large/

:s/big/large/

In which vim mode do you actually type-in the text?


Command Mode
Insert Mode
Last Line Mode
Data Mode
Typing Mode

Insert Mode

Which character in vim allows you to go from Insert Mode to Command Mode?


Control Key
Escape Key
Control, Alt, Delete Keys Simultaneously
Any of the above will work.
None of the above

Escape Key

Which keystroke command in vim allows you to append text AFTER the character the cursor is on?


i
a
o
u
None of the above

a

While in vim command mode, what command will exit without saving the file?


:q
:Q
:q!
:wq

:q!

In Vim, text that has been deleted or yanked to the general-purpose buffer can be inserted after the position of the cursor with the command


:put
:/i
p
Control-Insert

p

Which of the following is a Linux clone of vi?


elvis
nvi
vile
vim
All of the above.

All of the above.

What command causes vim to display line numbers next to the text being edited?


:i nu
:set number
:insert numbers
:set nums

:set number

In the vim editor, the key combination CTRL+f


moves screen up one line
moves cursor down one line
moves cursor up one line
moves screen down one page

moves screen down one page

What command will write the work buffer to the disk and then exit vim?


ZZ
:wq
both of the above are correct.
You must enter two commands;
:s
then
:x

both of the above are correct.

The vim yank command (y) is identical to the delete command (d)


except that it does not delete text from the work buffer.
except that it deletes the text from the work buffer without making a copy in the general-purpose buffer.
except that it does not place a copy of the deleted text in the general purpose buffer.
and there is no difference between the two commands.

except that it does not delete text from the work buffer.

The vim command 4dw does which of the following?


Deletes four spaces after the current word
Deletes four words starting at the cursor position
Deletes 4 words after the current line
Deletes four characters from the buffer
None of the above

Deletes four words starting at the cursor position

Which command searches the work buffer in a file opened in the vim editor?


* or ?
< or >
/ or ?
& or /

/ or ?

Which vim editor command copies the current line of the file?


yy
yw
yc
none of the above.

yy

What is the vim command to delete the text from the cursor to the end of the paragraph?


d}
d$
xx
X

d}