-
What would you type at the command line if you wanted to see the value of the variable SHELL?
echo $SHELL
-
If you started typing the name of a file on the command line and wanted Unix to supply the rest, what would you do?
hit the Tab key
-
What is the name of the directory at the top of the Unix filesystem?
root
-
What symbol is used to represent the top of the Unix filesystem?
/
-
By default, which account is the owner of a file or directory?
the account that created it
-
What do you call a text file containing Unix commands that is run
just before the shell gives you a prompt?
a startup file
-
What directory is the starting point for EVERY absolute path?
the root directory
-
What directory is the starting point for a relative path?
the current directory
-
Name the three types of access permissions.
read, write and execute
-
What does the PATH shell variable contain?
the list of directories the shell must search
to find the file to run a command
-
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
-
By default, where does Standard Input come from?
the keyboard
-
By default, where does Standard Output go?
to the screen
-
By default, where does Standard Error go?
to the screen
-
Look at the diagram on the
last page.
You are in the directory named courses.
Write the ABSOLUTE pathname for the directory named
hw1 under the it116
directory.
You do not have to write a Unix command, I only want the pathname.
/courses/it/it116/hw/hw1
-
Look at the diagram on the
last page.
You are in the directory named courses.
Write the RELATIVE pathname for the directory named
hw2
under the it244 directory.
You do not have to write a Unix command, I only want the pathname.
it/it244/hw/hw2
-
Look at the diagram on the
last page.
You are in the directory named it117.
Write the RELATIVE pathname for the root directory.
You do not have to write a Unix command, I only want the pathname.
../../..
-
Look at the diagram on the
last page.
You are in the directory named test
under projects.
Write the RELATIVE pathname for the gh
directory under home.
You do not have to write a Unix command, I only want the pathname.
../../home/gh
-
Look at the diagram on the
last page.
You are in the directory courses.
Write the command to create a soft link to the it117
directory under the it directory.
You may use either an absolute or relative pathname.
ln -s it/it117
-
Using REDIRECTION, create a duplicate of the file memo.txt
called memo.bak. DO NOT use the copy command.
cat memo.txt > memo.bak
-
What is the name of the only program that can create a process?
the kernel
-
Write the command line you would use on the file
notes.txt to give
read and write permission to the owner, read permission to the group
and no permission to everyone else.
chmod 640 notes.txt
-
Write the command line you would use on the directory
memos to give
all permissions to the owner, the ability to run
ls to
the group and the ability to cd into the directory to everyone else.
chmod 741 memos
-
Write the command you would use to find all the lines in the file
results.txt that contained "help" but not "apple".
grep help results.txt | grep -v apple