Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION 1 You have finished your thesis, and want to set the permissions so tha

ID: 3809611 • Letter: Q

Question

QUESTION 1

You have finished your thesis, and want to set the permissions so that it is hard to accidentally delete or overwrite the file.

Normally, if you were to type "rm Thesis.txt", it would just delete it without asking. Or, if you moved a file with the same name into the same directory as your original Thesis.txt, it would overwrite it with the new version.

Which command would change the permissions for a file called Thesis.txt so that you are less likely to delete or overwrite it by accident?

chmod o-rwx Thesis.txt

chmod a+rwx Thesis.txt

chmod a+w Thesis.txt

chmod a-w Thesis.txt

QUESTION 2

You have a file named Homework with the following permissions:

-rw-r--r-- 1 fsmith staff 12 Feb 20 14:08 Homework

Which command would you type to make sure that you were the only one with permission to view the contents of the file? (permissions should look like this when done)

-rw------- 1 fsmith staff 12 Feb 20 14:08 Homework

chmod 400 Homework

chmod 600 Homework

chmod rw Homework

chmod 777 Homework

QUESTION 3

Match the name of the directory to the description

/etc

/usr/bin

/

/var

The directory that holds most of the computer programs or applications

The directory that holds most of the system configuration files

The root, or top of the Unix directory tree. All directories are sub-directories of this.

This directory holds data that is often changing, like database files, incoming user email, etc.

QUESTION 4

A file named "homework" had the following permissions: -rw-r--r--

Which command could have been typed to change the permissions to this: -r--r-----

chmod a-r homework

chomd g-r homework

chmod 440 homework

chmod 465 homework

  

QUESTION 5

Which command would you type to delete a file named "Bad-Homework.txt"?

dl Bad-Homework.txt

rm Bad-Homework.txt

rm bad-homework.txt

ln bad-homework.txt

  

QUESTION 6

In Unix, what does the .. (or dot dot) directory specify?

The last directory visited

The current working directory

The working directory's parent directory

The top of the directory tree

  

QUESTION 7

If you have been wandering around the Unix filesystem, which command could you type to bring you back to your home directory?

ls

pwd

cd

home

QUESTION 8

What key or keys can you press to interrupt (politely ask to terminate) a program that is running in your terminal?

Delete-Enter

Ctrl-c

ESC

X

QUESTION 9

There might be more than one version of a program on a Unix system, and you might not know which one is executed when you type the name of the command. What would you type to identify the exact location of a program named "lsof"?

id lsof

which lsof

where lsof

uniq lsof

QUESTION 10

What is the difference between > and | ? Or what is the difference between redirection and the pipe?

They are both the same, but pipelines were added by Linux as an alternative symbol.

The redirection operator connects a command with a file while the pipeline operator connects the output of one command with the input of a second command.

The redirection operator connects a command can be used by regular users on a system, while pipelines can only be used by administrators.

The redirection operator connects a command with a file while the pipeline operator reads input from the keyboard.

a.

chmod o-rwx Thesis.txt

b.

chmod a+rwx Thesis.txt

c.

chmod a+w Thesis.txt

d.

chmod a-w Thesis.txt

Explanation / Answer

QUESTION 5

Which command would you type to delete a file named "Bad-Homework.txt"?

answer is dl Bad-Homework.txt

QUESTION 6

In Unix, what does the .. (or dot dot) directory specify?

answer is The current working directory

QUESTION 7

If you have been wandering around the Unix filesystem, which command could you type to bring you back to your home directory?

answer is ls

QUESTION 8

What key or keys can you press to interrupt (politely ask to terminate) a program that is running in your terminal?

answer is X

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote