- Assume that you are in a directory that contains the files listed at the bottom of the diagram at the back of this exam.
What ARGUMENT USING META-CHARACTERS would you give tolsto list the files whose name starts with "bar" followed by the digits 3 through 7, followed by ".txt"?
I do not want the full command, just the argument to that command.bar[3-7].txt- Look at the diagram at the back of this exam.
Assume that you are in the directory courses.
Write the RELATIVE pathname you would use to reference the directory ghoffman under the directory home.
I do not want a command, just the pathname.../home/ghoffman- Write the command you would use to create the files foo1.txt to foo5.txt using brace expansion and the
touchcommand.touch foo{1,2,3,4,5}.txt- By default, where does Standard Output go?
to the screen- Assume that you are in a directory that contains the files listed at the bottom of the diagram at the back of this exam.
What ARGUMENT USING META-CHARACTERS would you give tolsto list all files whose name starts with "foo" followed by one character and ".txt" in this directory?
I do not want the full command, just the argument to that command.foo?.txt- Assume that you are in a directory that contains the files listed at the bottom of the diagram at the back of this exam.
What ARGUMENT USING META-CHARACTERS would you give tolsto list all files with a .sh extension in this directory?
I do not want the full command, just the argument to that command.*.sh- Look at the diagram at the back of this exam.
Assume that you are in the directory courses.
Write the RELATIVE pathname you would use to reference the directory mary under f21 under it117.
I do not want a command, just the pathname.it117/f21/mary- What is special about a GLOBAL variable?
you can use it in any subshell of the shell in which it was created.- Write a command that will print ALL global variables and their values.
env- Look at the diagram at the back of this exam.
Assume that you are in the directory it244.
Write the ABSOLUTE pathname you would use to reference the directory proj1 inside the directory jimbo.
I do not want a command, just the pathname./home/jimbo/proj1- What is a process?
a running program- What does a program do just before it stops running?
it sends an exit status to the shell- What are the limitations of a LOCAL variable?
you can only use it in the shell in which it was created- What do [ and ] mean when used in an
ifstatement?they stand for thetestcommand- Look at the diagram at the back of this exam.
Assume that you are in the directory tmp inside ghoffman.
Write the RELATIVE pathname you would use to reference the root directory.
I do not want a command, just the pathname.../../..- What does the PATH shell variable contain?
the list of directories the shell must search to find the file to run a command- Can an alias be made global?
no- By default, where does Standard Input come from?
the keyboard- Write the format string you would give to
chmodto give a DIRECTORY the following permissions.
Give the owner all permissions.
Give the group permission to see and change the contents of the directory.
Give everyone else no permissions for that directory .760- What is the name of the process that starts automatically whenever pe15 is turned on?
systemd- Write the command that will find all the lines in the file memo.txt that contain the word "mountain" but not the word "range".
grep mountain memo.txt | grep -v range- When does a
whileloop stop running?when the command followingwhilereturns an exit status that is not 0- By default, where does Standard Error go?
to the screen- What command would you use to see all currently running jobs?
jobs- Is there any limit to the number of blocks of commands you can have in an
if ... else ... elifstatement?no- Write the format string you would give to
chmodto give a FILE the following permissions.
Give the owner read, write and execute permissions.
Give the group read permissions.
Give read and execute permissions to anyone else.
I just want the format string NOT the whole command.745- What is the value of the exit status returned by
testto indicate that the expression is true?0- What parameter gives the total number of arguments passed to a script from the command line?
#- What would you type at the command line if you wanted to suspend a job running in the foreground?
Control Z- What does the
breakcommand in a loop do?jumps completely out of the loop- Does the command that follows
ifneed to betest?no, it can be any command that returns an exit status- What parameter gives the full pathname of the script that is currently being run?
0- If you ran the script bother.sh as shown below, what command would you use to stop this script?
$ ./bother.sh & [1] 26422kill 26422 or kill %1