-
Write a command that will change the permissions on the
file work.sh so that the owner
can do anything with the file, the group can read and write it,
and everyone else can only read the file.
You MUST use the numeric format to specify the permissions.
chmod 764 work.sh
-
By default, where does Standard Output go?
to the screen
-
What does an exit status of 0 mean?
it means that the program encountered no errors
-
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
-
If you have read permission on a directory, what can you do in it?
run ls
on the directory to list its contents
-
Look at the diagram on the last page.
You are in the directory named gh under the
home directory .
Write the RELATIVE pathname for the directory named it117
under the courses directory.
You do not have to write a Unix command, I only want the pathname.
../../courses/it
-
Write a command that will change the permission on the directory
dir1 so that the owner can do anything in the directory,
the group can run
ls
and change the names of files in the directory, and everyone else
can only run cd
on the directory.
You MUST use the numeric format to specify the permissions.
chmod 761 dir1
-
What is the name of the account that can do ANYTHING on a Unix or Linux system?
root
-
If you wanted to send the output of
ls
to the file
dir_listing.txt, what would you enter at the command
line?
ls > dir_listing.txt
-
Name the three categories of accounts which are used in assigning access permissions.
owner, group, everyone else
-
What does a program do JUST BEFORE it stops running?
it sends an exit status to the shell
-
Using REDIRECTION, create a duplicate of the file memo.txt
in your current directory, called memo.bak,
also in your current directory.
DO NOT use the copy command.
cat memo.txt > memo.bak
-
Write a single command line entry that will find all lines in the file
notes.txt that contain "goat" but not "shepard".
grep goat notes.txt | grep -v shepard
-
What is a process?
a running program
-
Look at the diagram on the last page.
You are in the directory named courses.
Write the RELATIVE pathname for the directory named hw1
under the it244 directory.
You do not have to write a Unix command, I only want the pathname.
it/it244/hw/hw1
-
Look at the diagram on the last page.
You are in the directory named django
under projects.
Write the ABSOLUTE pathname for the directory named
hw under the it116 directory.
You do not have to write a Unix command, I only want the pathname.
/courses/it/it116/hw
-
Look at the diagram on the last page.
You are in the directory named hw under
the it116 directory.
Write the RELATIVE pathname for the root directory.
You do not have to write a Unix command, I only want the pathname.
../../../..
-
If you have read permission on a directory, can you read the files in that directory?
no, you need read permission on each file
-
By default, which account is the owner of a file or directory?
the account that created it
-
What do you call the directory directly above your current directory?
the parent directory
-
What is the name of the only program that can create a process?
the kernel
-
By default, where does Standard Input come from?
the keyboard
-
If you wanted to run the executable script work.sh
in your current directory without using
bash
, what
would you type at the command line?
./work.sh
-
Write a single command to copy the file memo.txt
from your parent directory to your current directory.
cp ../memo.txt .