Introduction to Linux - Chapter 1 - 14

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Shell command man pages are typically located in section ___. 1 3 4 2

1

To save and then quit, you can type in command mode: :wq :q :qw :WQ

:wq

What character do you place between commands to execute multiple commands on a single command line? ; & : ~

;

The path testdir/file.txt is: An invalid path A relative path A circular path An absolute path

A relative path

The path /data/file.txt is: A circular path An absolute path A relative path An invalid path

An absolute path

To switch to another group, you must: Be a member of the group that you are switching to Be logged in graphically Log off and log back in Log in as the staff user

Be a member of the group that you are switching to

gzip and bzip are aliases for the same utility. True or False? True False

False

Local variables are: Are not a valid type of variable Passed into other shells and commands Only available to the shell they are created in Not used by shells at all

Only available to the shell they are created in

The _____ variable stores directories that the shell used to find executable files. CD DIR PATHS PATH

PATH

Which of the following functions is not a primary use of the tar command: Extract archives View archives Create archives Repair corrupted archives

Repair corrupted archives

The rm command can be used with glob characters to delete multiple files. True or False? True False

True

The touch command can be used to change a file's time-stamp to something other than the current system time. True or False? True False

True

The unzip command can be used without options to extract files from a zip archive. True or False? True False

True

Bash is: a website a networking term a shell an operating system

a shell

Which command can change the user owner of a file? chown own pawn chpawn

chown

The _____ command will search for files by searching the live filesystem. find locate search updatedb

find

If you want to set the maximum line width for a text file, you can use: od fmt pager format

fmt

To view statistics on memory availability, you can use: mem stat free uname

free

To view system memory usage, you can use the _____ command. uptime nice free ps

free

To decompress the archive example.gz, use the following command: gunzip example.gz gunzip -x example.gz gzip -u example.gz gzip -x example.gz

gunzip example.gz

If you want to move a character to the left in vi command mode, you can press the left arrow key or: l h j k

h

To see a list of commands that are available while viewing a man page, you can type the __ character. w h g c

h

Which type of link is indistinguishable by programs from regular files, hard or soft? soft hard

hard

Which of the following is not a valid argument for the dd command? count in if bs of

in

When copying entire devices using the dd command, you must specify: block size and count only input file and output file only input file, output file, and block count input file, output file, block size and count

input file and output file only

By default, tar will attempt to extract an archive... into the working directory. to the specified directory. into the archive's parent directory. into the user's home directory.

into the working directory.

If you want to move down a line in vi command mode, you can press the down arrow key or: l j h k

j

If you want to move a character to the right in vi command mode, you can press the right arrow key or: l k j h

l

When viewing a file with the ls -l command, which character represents a file type of soft link? - d f l

l

Which character at the beginning of a long listing indicates a symbolic link? d c - l

l

Which of the following commands will create a soft link from the /tmp/test file to the /tmp/data file? ln /tmp/test /tmp/data ln /tmp/data /tmp/test ln -s /tmp/test /tmp/data ln -s /tmp/data /tmp/test

ln -s /tmp/test /tmp/data

The _____ command will search for files using a database of all files, which is generated daily. find locate search updatedb

locate

Which of the following commands will take the standard error of the ls command and put it into the /tmp/output.txt file: ls 2> /tmp/output.txt ls | /tmp/output.txt ls 2 | /tmp/output ls > /tmp/output.txt

ls 2> /tmp/output.txt

Which command is used in order to view the manual page for a topic? show man help doc

man

Which command will allow you to switch to another group and add files that are group owned by this other group? chgrp switchgrp newgroup newgrp

newgrp

What command can be used as a prefix to another command to run it at an altered priority? low chpr nice pri

nice

If you want a file to be displayed with its lines numbered, you can use: nl cut fmt number

nl

If you want a background process to keep running after log out, you can use: nokill nohup nofg bg

nohup

If you are in vi command mode and want to add a new line after your cursor, you can type: o O i a

o

This command displays binary files in a variety of representations: od format cut cat

od

Which command will merge two files together line by line? combo paste join merge

paste

To change the niceness value of an existing process, you can use the _____ command. renice set reset nice

renice

What command can be used to alter the priority of a running process? repri renice relow chpr

renice

What permissions are typically placed on soft link files? ——— rw-rw-rw- rwxrwxrwx rwx——

rwxrwxrwx

Which of the following is a non-interactive editor? ed vi nano sed

sed

Environment variables cannot be declared by which command? typeset declare export set

set

To view all current variables, you can use: dump var view set

set

Which permission is used to make a directory so that only root, the owners of files or the owner of the directory can remove them? sticky bit setgid write setuid

setgid

To execute a command called "simple" as a foreground process, you would type: fg simple simple & foreground simple simple

simple

Many commands that read text files will also read from this stream: pipe stdin redirect input

stdin

A soft link is also called a _____ link. symbolic indirect true false

symbolic

Which of the following commands could be used to extract the archive, example.tar? tar -uz example.tar tar -xz example.tar tar -xf example.tar tar -uf example.tar

tar -xf example.tar

The file command uses _____ to determine file types. magic the "magic" file alchemy a random number generator

the "magic" file

To move forward one word at a time in the vi command mode, you press: f t g w

w

Which archiving method is compatible across Linux, Microsoft Windows and Mac operating systems? cpio dd zip tar

zip

Which two symbols can effectively redirect stdin to a command? (choose two) > ! | <

| <

Which file can you place in your home directory to be executed when you log off the system? /etc/bashrc ~/.bash_logout ~/.bashrc ~/.bash_profile

~/.bash_logout

Which of the following files is specific to each user and executed only during login? ~/.bash_profile /etc/profile /etc/bashrc ~/.bashrc

~/.bash_profile

Which of the following files is specific to each user and executed every time a bash shell is opened? ~/.bashrc ~/.bash_profile /etc/bashrc /etc/profile

~/.bashrc

Long command options are preceded by which two characters? && — || **

Which two characters do you use to tell the command that you are finished providing options and that the remaining data on the command line is arguments? — ** || &&

Which of the following commands will execute the last command that started with ec: !! !!ec !ec !-ec

!ec

Which two characters represent the empty string? ** && .. ""

""

Which of the following is not used for globbing? [ # ? *

#

To navigate to the end of the line in vi command mode, you can press: # ^ $ *

$

Placing an __ character at the end of the command line will put the command in the background. ! & B ?

&

To send the normal and error output of a command to a single file, you can use: 2> > 1> &>

&>

Which glob character matches "zero or more characters"? . ? * [

*

Which regular expression character matches zero or more of the previous character? ? + * .

*

Which of the following regular expression characters is an extended regular expression character? + . $ *

+

Which regular expression character matches one or more of the previous character? - $ * +

+

Which character at the beginning of a long listing indicates a regular file? l d - c

-

To execute a command with the highest possible priority, which value do you pass to the nice command? -20 19 0 20

-20

Which option to the ls command will sort the output by size instead of alphabetically? -r -s -S -t

-S

To maintain timestamps when using the cp command, use: -T -A -a -t

-a

Use the ___ option to display hidden files with the ls command. -A -h -D -a

-a

Which option to the gzip command can be used to retain the uncompressed files when creating an archive? -R -F No option needed, gzip does this by default -c

-c

Which option to the find command will execute a command on each matching file without prompting the user? -exec -ok -ls -print

-exec

If you want to use grep without regard to the capitalization of text, you can use the option: -t -v -i -r

-i

Which of the following options puts the cpio command into copy-in mode? -i -u -o -v

-i

Which option for the rm command will cause it to prompt before deleting files? -I -p -i -a

-i

Which option to the locate command will have the command perform case-insensitive searches? -I -g -i -s

-i

Which option to the ls command displays the inode numbers of files? -inum -i -l -N

-i

Which option to the find command will search by name using a case-insensitive match? -iname -inum -insen -i

-iname

Which option to the find command will search by name using a case-sensitive match? -mmin -iname -cmin -inum

-iname

What option to the find command allows you to search for files by inode numbers? -links -ipath -inum -mtime

-inum

What option to the kill command will list the signals for the system? -9 -list -l -r

-l

Which option to the unzip command can be used to estimate the size of an archive when it is decompressed? -l -c -R -F

-l

Which option to the zip command will list its files without uncompressing them? -R -l -c -F

-l

Which option to the find command will display a "long listing" of matching files? -ok -exec -print -ls

-ls

Which of the following options puts the cpio command in copy-out mode? -v -u -o -i

-o

Which option to the find command will prompt the user to execute a command on each matching file? -print -ok -ls -exec

-ok

You can pass arguments to long options by using which of the following techniques: (choose two) -option{argument} -option~argument -option=argument -option argument

-option=argument , -option argument

Which mkdir option should be used to create parent directories (that don't already exist) along with the specified directory? -F -d -A -p

-p

Which option to the ls command will reverse the sort order? -t -r -S -s

-r

Which option to the zip command can be used to recursively compress multiple directories? -r -R -l -d

-r

Which option(s) for the rm command can be used to delete directories that contain files? (choose two) -r -R -A -D

-r , -R

To copy the contents of a directory, use the following option(s) for the cp command: (choose two) -A -r -d -R

-r , -R

The _____ option to the uname command will display the kernel name. -s -x -k -n

-s

Which option to the ls command will sort the output by time-stamp? -t -s -S -r

-t

Which option to the find command will search by file type? -type -fstype -ftype -file

-type

Which of the following options allows the cpio command to overwrite existing files? -u -v -o -i

-u

Which option to the find command will search by user owner? -user -person -owner -uowner

-user

Which option for grep will invert the pattern matching results? -i -v -r -o

-v

Which option to the bzip2 command can be used to report the compression ratio of an archive? -l -R -v -c

-v

The names of hidden files begin with the ___ character. * > + .

.

When specifying a path, the __ character symbolizes the current directory. .. / ~ .

.

Which regular expression character matches any one character? . ? + *

.

bzip2 archives are typically indicated with which file extension? .bz .bz2 .b2 .gz

.bz2

An absolute path always starts with which character? . / ~

/

To search for something while viewing a man page, you first type a __ character. > | < /

/

To search forward from your cursor in your vi document in command mode, you can type __ followed by the pattern to search for. / | ?

/

Which directory represents the root of the primary filesystem hierarchy? /var / /etc /root

/

Which directory is used to store the kernel? /kernel /etc /boot /

/boot

Which directory is used to store files representing attached devices? /tmp / /dev /mnt

/dev

Which directory is used to store configuration files specific to the host? /etc / /boot /var

/etc

Which of the following files is for all bash shell users and executed every time a bash shell is opened? /etc/bashrc /etc/profile ~/.bashrc ~/.bash_profile

/etc/bashrc

The output of the ls -l command includes "/etc/grub.conf -> ../boot/grub/grub.conf". Based on this information, which is the soft link file? ../boot/grub/grub.conf Both Neither /etc/grub.conf

/etc/grub.conf

The location of users' default shells is stored in the ______ file. /etc/passwd /etc/group /etc/gshadow /etc/shadow

/etc/passwd

Which of the following files is for all bash shell users and executed only at login? ~/.bash_profile ~/.bashrc /etc/bashrc /etc/profile

/etc/profile

Which directory is used to store user home directories? /homedir /home /usr /tmp

/home

Which directory is used to store essential libraries? /usr /bin /var /lib

/lib

What directory is used as a temporary mount point? /xbin /mnt /tmpmnt /etc

/mnt

Which directory is used for the home directory of the root user? /var / /root /home/root

/root

Which directory is used to store temporary files? /temp /tmp /etc /

/temp

To execute a command with the default priority, which value do you pass to the nice command? -20 20 19 0

0

What umask value would you use in order for new directories to have the permissions of rwxr-x-x? 027 077 022 026

026

To execute a command with the lowest possible priority, which value do you pass to the nice command? 0 20 -20 19

19

To go to the first line of a vi document in command mode, you can type: (choose two) G GG 1G gg

1G , gg

Which value represents the hard link count in the following output of the ls -li command: 87589 -rw-r-r-. 2 root root 83 Mar 4 22:45 myhosts 87589 2 22:45 83

2

To redirect the errors that are output by a command, you can use: @ 2> 2@ 2&

2>

Special file man pages are typically located in section ____. 3 4 1 2

4

If a file has permissions that appear as rwxr-x—, what is the octal permission mode of the file? 760 650 750 740

750

System Administration man pages are typically located in section ___. 8 6 7 9

8

Which value represents the inode number in the following output of the ls -li command: 87589 -rw-r-r-. 2 root root 83 Mar 4 22:45 myhosts 22:45 83 2 87589

87589

In the PATH variable, the __ character is used to separate the directories. : ; ~ /

:

If you want to quit the vi program without saving any of the changes you made to your file, you can type in command mode: :a :Q :s :q!

:q!

Typing which of the following from vi command mode will attempt to save your file? :w :s :f :r

:w

If you want to overwrite a file by redirecting the output of a command, you can use: & > } |

>

If you want to append a file with the normal output of a command, you can use: 2>> > >> 1>

>>

To search backward from your cursor in your vi document in command mode, you can type __ followed by the pattern to search for. ? / |

?

Which glob character matches "exactly one character"? ? * . [

?

If you are in vi command mode and want to begin inserting text at the end of the line, you can type: o I O A

A

The glob pattern [a-d] would match: A file name with a single character that is either an "a", "-", or "d". Nothing, this is an invalid glob pattern. A file name with a single character that is either a "a", "b", "c", or "d". All files

A file name with a single character that is either a "a", "b", "c", or "d".

A signal is: A technique to tell a process to take some sort of action A command option A technique to send data to a process A command argument

A technique to tell a process to take some sort of action

The range defined inside of square brackets is based on the: Standard text table ASCII text table Invalid question as ranges are not permitted ANSI text table

ASCII text table

The command, chmod a+x will: Remove execute permission for all users Add execute permissions for the user owner Remove execute permissions for the user owner Add execute permission for all users

Add execute permission for all users

The glob pattern [!abc]* Nothing, this is an invalid glob pattern All files that start with any character except "a", "b" or "c" All files All files that start with either of the following characters: "!", "a", "b" or "c".

All files that start with any character except "a", "b" or "c"

The command echo a* will display: All of the files in the current directory that begin with an "a" character. Only the file named "a*". All of the files in any directory that begin with an "a" character. All of the files in the current directory that begin with an "a" or "A" character.

All of the files in the current directory that begin with an "a" character.

The command echo ???a will display: All of the files in the current directory that have four characters in the file name. All of the files in the current directory that have four characters in the file name with the last character being an "a" character. All of the files in the current directory that end with an "a" character. Only a file named ???a

All of the files in the current directory that have four characters in the file name with the last character being an "a" character.

For rwxr-x-x permission set, the bolded permissions belong to: The user owner and group owner of the file All users besides the user owner and group owner The user owner of the file The group owner of the file

All users besides the user owner and group owner

A command can be: (choose three) An alias A block A configuration file A variable A function A program built-in to the shell

An alias , A function , A program built-in to the shell

The tar command supports: gzip compression only bzip compression only Both gzip and bzip2 compression only uncompressed archives

Both gzip and bzip2 compression

The group ownership of a file may only be changed by: The owner of the file Any user can change the group ownership of any file The root user Both the root user and the owner of the file

Both the root user and the owner of the file

Assuming everyone has access to the directory the file is in, who can view the contents of a file with permissions of rw-r—-x? Nobody Both the user owner and group owners Only the user owner Everyone Only the group owners

Both the user owner and group owners

The two login types are: URI and CLU CLI and GUI URI and CLI GUX and CLI

CLI and GUI

The key press combination that will request a running process terminate: CTRL+z CTRL+d CTRL+p CTRL+c

CTRL+c

The key press combination that will request a process to stop is: CTRL+z CTRL+p CTRL+c CTRL+d

CTRL+z

Using the setgid permission on a directory: Causes new files created in the directory to be owned by the group that owns the directory Causes the directory to be writable to members of the group that owns the directory Causes files existing in the directory to be made executable by the group Causes files existing in the directory to be owned by the group that owns the directory

Causes new files created in the directory to be owned by the group that owns the directory

The setuid permission on a file: Causes the file to always run as root Causes the file to never run as root Causes the file to run under the owner's identity Causes the file to run under the user's identity

Causes the file to run under the owner's identity

The /usr/local/bin directory contains: The most fundamental commands that are essential for the operating system to function Nothing; it is not a valid directory Commands that have been compiled from local sources Essential administrative commands

Commands that have been compiled from local sources

The mkdir command cannot be used to: Delete a directory Create new directories Create multiple directories at once Create sub-directories in different parent directories

Delete a directory

What would typing "4dh" do in vi command mode? Duplicate the next four characters Delete the previous four characters Delete the next four lines Delete the next four characters

Delete the previous four characters

The head -n -1 readme.txt command will: Show the first character of every line of readme.txt Display all but the last line of readme.txt Number the lines of readme.txt Display the first line of readme.txt

Display all but the last line of readme.txt

The command man 5 passwd will: Display the man page of Section 5 for passwd. Print the first five man pages that refer to the term passwd. Not work; you can't give a numeric argument to the man command. Display the first five lines of the man page for the passwd command.

Display the man page of Section 5 for passwd.

The /sbin directory contains: Commands that have been compiled from local sources Nothing; it is not a valid directory The most fundamental commands that are essential Essential administrative commands

Essential administrative commands

Which permission is necessary on a directory in order for a user to use the cd command to change that directory? Read None Execute Write

Execute

It is not possible to recursively compress files within directories with gzip. True or False? True False

False

The command manual ls will provide detailed information about how the ls command functions. True or False?

False

The cpio command has four modes of operation. True or False? True False

False

The ls command can list the contents of only one directory at a time. True or False? True False

False

The rmdir command can be used to delete directories and their contents. True or False? True False

False

To run binary executables, you need both read and execute permission. True or False? True False

False

Using the kill command always terminates processes. True or False? True False

False

When you create a soft link, it increases the hard link count by one.True or False? True False

False

gzip and bzip2 use the same compression algorithm. True or False? True False

False

Two tables have columns with the same field names. What is required in order to join the two tables? Change field names in one of the tables to make it unambiguous Join between such tables cannot be created Create a dummy table which has no common fields Field names must be prefixed by the table name and a period

Field names must be prefixed by the table name and a period

The ls-l command output will not include: File permissions Timestamp Hard link count File contents

File contents

The tar command supports which of the following styles of option(s)? (choose three) DOS GNU BSD Unix

GNU , BSD , Unix

Which are valid link types in Linux? (choose two) Filesystem links Stable links Hard links Soft links

Hard links , Soft links

Shell variables are used to: Reboot the system Prevent users from logging in Hide passwords Hold critical system information

Hold critical system information

Which character(s) cannot be placed in variable names? Upper-case alpha characters Hyphen ("-") character Underscore ("_") character Lower-case alpha characters Numeric characters

Hyphen ("-") character

Select the function that the tr command cannot perform: Translate from one set of characters to another Delete specific characters Eliminate duplicate characters Insert characters

Insert characters

Which of the following are advantages of using the find command? (choose two) It can search by file attribute types It is quicker than the locate command Its results are always the most up-to-date It pages the results

It can search by file attribute types , Its results are always the most up-to-date

Which of the following are advantages of using the locate command? It is quicker than the find command Its results are always the most up to date It pages the results It can search by file attribute types

It is quicker than the find command

The uptime command prints a statistic representing the system load over what three time spans? (choose three) Last thirty minutes Last minute Last five minutes Last ten minutes Last fifteen minutes Last hour

Last minute , Last five minutes , Last fifteen minutes

The command, chmod 2777 /data will: Make the /data directory a setgid directory Make the /data directory a sticky bit directory Make the /data directory a setuid directory Remove all special permissions

Make the /data directory a setgid directory

The command, chmod 1777 /data will: Make the /data directory a setuid directory Make the /data directory a sticky bit directory Remove all special permissions Make the /data directory a setgid directory

Make the /data directory a sticky bit directory

Within square brackets, (Example: [?]) the ? character means: Match a ? character Match zero or more of any ? characters Exactly one character Nothing, it has no meaning at all

Match a ? character

How many times can you use a * glob character in a pattern? Two No limit Three One

No limit

If you are in the vi command mode and want to add a new line before your cursor, you can type: i o O a

O

The [ ] characters around day in the example cal [-smjy13] [[[day] month] year] means that day is: An argument that must be "day" and nothing else An option, not an argument Required Optional

Optional

Which of the following is a valid way to add the /data directory to the existing PATH variable? $PATH=$PATH:/data PATH=$PATH:/data $PATH=/data PATH=/data

PATH=$PATH:/data

Environment variables are: Only available to the shell they are created in Are not a valid type of variable Passed into other shells and commands Not used by shells at all

Passed into other shells and commands

The command, chmod 0777 /data will: Make the /data directory a setuid directory Make the /data directory a setgid directory Make the /data directory a sticky bit directory Remove all special permissions

Remove all special permissions

What does "|" do in a regular expression? Redirects input to the command Redirects output from the command Separates repetition modifiers Separates alternative patterns that can be matches

Separates alternative patterns that can be matches

The command, chmod u=g will: Set the group owners permissions to match the user owners permissions Set the user owners permissions to match the group owners permission Nothing, the command syntax is invalid Set the user owners permissions to rwx

Set the user owners permissions to match the group owners permission

The expand and unexpand commands change: (choose two) New lines Carriage returns Spaces Tabs

Spaces , Tabs

The PATH environment variable is used for: Specifying locations that are writable for the user Specifying directories to search for executable files Specifying directories to contain documentation Specifying locations where ordinary users can navigate

Specifying directories to search for executable files

If you have a file named /tmp/hosts pointing to a file named /etc/hosts and the /etc/hosts file is deleted, then which of the following statements is true? The /tmp/hosts file now points to nothing You can still access the data by using /tmp/hosts The data from /etc/hosts is automatically copied into /tmp/hosts before /etc/hosts is deleted It is not possible to delete the /etc/hosts file while a soft link is pointing to it

The /tmp/hosts file now points to nothing

Which of the following man page sections will provide an example of how a command is executed? The SYNOPSIS section The DESCRIPTION section The FILES section The NAME section

The SYNOPSIS section

When typing a command, you can have the bash shell complete the command by pressing which key? The Up Arrow key The Del key The Backspace key The Tab key The Enter key

The Tab key

Which command performs globbing? The ls command The echo command The bash command The display command

The bash command

The PATH variable will be used under which situation? The command is an alias. The command is not found. A full path name to a command is provided. The command is a function.

The command is not found.

By default, what does the cp command preserve from the original file? The timestamps The name The permissions and ownership The contents

The contents

The "." in an ls listing represents: Directories that can't be accessed Hidden files The end of the command output The current directory

The current directory

The ls command will list which of the following by default? The root directory The current directory Nothing; it requires an argument User's home directory

The current directory

If you have 5 hard linked files and you delete four of them including the original one, then: The file still exists, but the data in the file is deleted You lose the data from the file The hard link count goes to 0 The data is still available from the remaining file

The data is still available from the remaining file

For the rwxr-x-x permission set, the bolded permissions belong to: The group owner of the file All users besides the user owner and group owner The user owner and group owner of the file The user owner of the file

The group owner of the file

The /bin directory contains: Nothing; it is not a valid directory The most fundamental commands that are essential for the operating system to function Commands that have been compiled from local sources Essential administrative commands

The most fundamental commands that are essential for the operating system to function

The only person who can change the user ownership of a file is: The root user The owner of the file Both the root user and owner of the file Any user can change the group ownership of any file

The root user

To set a priority value lower than 0, you must log in as which user? Any user account No user can specify a priority lower than 0 The root user The adm user

The root user

For the rwxr-x-x permission set, the bolded permissions belong to: All users besides the user owner and group owner The group owner of the file The user owner and group owner of the file The user owner of the file

The user owner of the file

The syntax [-u|-utc|-universal] means: These three options are different These three options mean the same thing These are required options This is invalid syntax

These three options mean the same thing

What is NOT a purpose of using parentheses around parts of a regular expression? They can be used to make alternation more efficient They can be used to refer back to what was matched They can be used to group characters for repetition They can be used to change the order that the pattern is evaluating

They can be used to change the order that the pattern is evaluating

Which is true about hard links? They are created with the ln -s command They share inodes They can only be created by the root user They can be made to directories

They share inodes

By default, using the touch command on an existing file will update the file's _____. Timestamp Type Permissions Ownership

Timestamp

Why would you press CTRL+C when executing tail? To capture the output into a file To complete the processing of a file To stop tail from following a file To get tail to copy the text it is outputting

To stop tail from following a file

The cpio command will preserve metadata when copying files. True or False? True False

True

The dd command can be used to copy entire partitions. True or False? True False

True

The dd command can be used to create iso files. True or False? True False

True

The dd command can be used to create large files the can be used as swap files. True or False? True False

True

The mv command can be used to move more than one file at a time. True or False? True False

True

The mv command will rename a file when a new directory is not specified. True or False? True False

True

The only user with the capability to change the owner of a file is root. True or False? True False

True

To access a directory with the cd command, you must also be able to access all the parent directories of the directory with the cd command. True or False? True False

True

To run a script file, you need both read and execute permission. True or False? True False

True

User home directories often contain hidden files. True or False? True False

True

When you create a hard link, it increases the hard link count by one.True or False? True False

True

You can combine glob characters in a single pattern, for example: a??*[0-9]. True or False? True False

True

To use regular expression characters to match themselves, you cannot: Put the character in the square brackets Use the fgrep command Use the slash in front of the character Use the backslash in front of the character

Use the slash in front of the character

Which of the following will create a variable? VAR+value VAR=value VAR value Var~value

VAR=value

The FHS sets which standard? Which directories should be used to hold specific files Which partitions should be created Which filesystem types should be used Which services should be installed

Which directories should be used to hold specific files

The main advantage of running a process in the background is: The process will automatically run at a low priority You can be assured that the process will not terminate early The process will be logged You can continue to use the shell that started the process

You can continue to use the shell that started the process

To go to the beginning of a line in the vi command mode, you press: g $ ^ 1

^

Which of the following characters can be used to negate (indicate NOT matching the following characters), when placed as the first of a set of characters enclosed in square brackets [] ? (choose two) ? ^ ~ !

^ !

The regular expression a? is equivalent to: a{0,1} a{1} a{1,} a{0,}

a{0,1}

The regular expression a* is equivalent to: a{0,1} a{1,} a{0,} a{1}

a{0,}

The regular expression a+ is equivalent to: a{1} a{1,} a{0,} a{0,1}

a{1,}

To move backward through a vi document, word by word, you press: w b r c

b

To send a paused process to the background, use the _____ command. fg ps bg jobs

bg

Which option to the bzip2 command can be used for recursive compression? -v bzip2 doesn't support recursive compression -c -R

bzip2 doesn't support recursive compression

If you want to see the entire contents of a text file, you can use the _____ command: dog type wc cat

cat

Which command will allow you to change the group ownership of a file that you own? regroup chgrp chown mask

chgrp

Which commands can be used to change the ownership of a file? (choose two) chggrp chgrp chown newgrp

chgrp , chown

Which command is used to change permissions on a file? chgmode chmod chgperm chperm

chmod

To have permissions set to rwxr-x-x, you can use the following command: chmod 751 chmod 755 chmod 777 file chmod 711

chmod 751

The basic form of a command line is: command [options...] [arguments...] command [arguments...] options command arguments options command [options...] arguments...

command [options...] [arguments...]

Using the touch command and specifying a nonexistent file... prompts the user to create a file. creates a blank file with that name. generates an error. does nothing.

creates a blank file with that name.

If you want to extract fields from a file, you can use: cols extract fields cut

cut

Which character at the beginning of a long listing indicates a directory? - l c d

d

To perform cut and paste in a vi document, you actually do: delete and put yank and put yank and paste delete and yank

delete and put

Which command will send text to the terminal display: echo type print show

echo

Which of the following will match files that have the string "hello" somewhere in the file name? echo hello*hello echo hello* echo *hello* echo *hello

echo *hello*

To use extended regular expressions, you can use: (choose two) grep -e fgrep egrep grep -E

egrep , grep -E

The _____ command will take another command for the argument to execute. exit uname exec pwd

exec

To replace the currently running shell, you can use: dash bash exec csh

exec

Environment variables can be viewed by running: (choose two) export -e vars export -p env

export -p , env

The _____ command will allow you to see commands that you have previously executed. hist previous history last

history

If you are in the vi command mode and want to begin inserting text before your cursor, you can type: A i o O

i

To see the list of background processes that you have started in your shell, you can run: process jobs work list

jobs

Which command merges two files like related tables in a database? paste join sql query

join

If you want to move up a line in vi command mode, you can press the up arrow key or: j h l k

k

The core software component that tells the hardware what actions to take is called the ________. compiler kernel transmitter

kernel

Which of the following is not a valid way to send the "force kill" signal to a process? kill -KILL PID kill -SIGKILL PID kill -9 PID kill -FORCE PID

kill -FORCE PID

To send a signal to a set of processes with the same name, you can run: killall grpkill allkill sigkill

killall

Which of the following commands will stop all processes owned by the user bob? (choose two) killall -u bob pkill -u bob kill -u bob kill -l

killall -u bob pkill -u bob

Which of the following commands will create a hard link from the /tmp/test file to the /tmp/data file? ln -s /tmp/data /tmp/test ln /tmp/data /tmp/test ln /tmp/test /tmp/data ln -s /tmp/test /tmp/data

ln /tmp/test /tmp/data

To perform a "long listing" to show file details, use which of the following commands: ls -D ls -L ll ls -l

ls -l

You want to execute the ls command with two options: -r and -l. Which of the following are valid ways to run this command: (choose three) rl ls ls -r -l ls -l -r ls -r -l ls rl ls -rl

ls -r -l , ls -l -r , ls -rl

Which of the following are valid command lines? (choose two) ls /etc -l ls -l /etc ls -/etc -l ls /etc

ls /etc -l , ls -l /etc

Which of the following commands will take the standard output of the ls and put it into the /tmp/output.txt file: ls 2 | /tmp/output ls 2> /tmp/output.txt ls > /tmp/output.txt ls | /tmp/output.txt

ls > /tmp/output.txt

Which command will display more information about globbing? echo globbing man 7 globbing man 7 glob man -7 glob

man 7 glob

To view the ASCII text table in Linux, you can use the following command: view ASCII list ACSII man ASCII echo ASCII

man ASCII

Two or more commands combined with the "|" between them form a: convoy caravan command line pipeline

pipeline

The _____ command provides many options for formatting a file for printing. pr format print header

pr

The _____ command will list the commands that are running in your terminal. list ps proc ls

ps

To view all processes on the system, you can execute: ps -all ps ps -f ps -e

ps -e

The ______ command will display your current working directory. uname exec pwd exit

pwd

To display your current location within the filesystem, you can type: whereami cwd dir pwd

pwd

Which type of link can be made to a file on another filesystem, hard or soft? soft hard

soft

Which type of link can be made to directories, hard or soft? hard soft

soft

Which type of link is easier to visually "see", hard or soft? hard soft

soft

To put the lines of a file in alphabetical order, you can run: uniq sort cat paste

sort

To process a script file in the current context, you execute: (choose two) . include source exec

source , .

If you want to break apart a large file into smaller files, you can use: split cat break dump

split

This stream is the output of a command operating normally: stdout stderr stdin stdnorm

stdout

A popular program for monitoring running processes in real-time is: watcher mon top ghost

top

In order to run a command called "tough" in the background, you would type: start -b tough tough& tough@ bg tough

tough&

The _____ command will tell you if a command exists as a built-in command, function, alias or a command located within the PATH variable. set export declare type

type

Which command can be used to set what your default permissions will be on new files? umode umask mode mask

umaskv

The _____ command displays information about the Linux kernel: kern uname real linux

uname

Which command will remove consecutive duplicate lines from a file? unique uniq dup dedup

uniq

If you want to delete a variable, you can run: wipe clear delete unset

unset

To see how long the system has been running, you can use the _____ command. free nice uptime ps

uptime


संबंधित स्टडी सेट्स

6-Client Profiles, Portfolio Strategies, and Taxation

View Set

final genetics practice questions

View Set

Ch. 15- Female Genitourinary Problems

View Set

Chapter 9 - Substance Related and Addictive Disorders

View Set