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

UESTION 2 What rm command option (flag) would you use to remove a file that begi

ID: 3908516 • Letter: U

Question

UESTION 2

What rm command option (flag) would you use to remove a file that begins with a - (hyphen)?

(HINT: Use the man pages to help with this answer.)

-f

-p

--

-i

10 points   

QUESTION 3

Execute the finger command as the following: finger fveglian

The output will contain the following line of text:

Project: I have three projects to complete by the end of the semester.

From what file in my home directory is the finger command getting that line of text?

Select your answer from the choices below.

.plan

.cshrc

.login

.project

10 points   

QUESTION 4

There is a file called lynx in my home directory. It has an i-node number of 16161.

There are two file entries  and  that are hard linked to lynx and have the same i-node number.

What are the two files by name?

10 points   

QUESTION 5

The following who command will output the last time the LINUX system was rebooted and the run-level of the system.

Execute: who -br

The output resembles the following. The date and time may be different:

system boot 2012-08-27 15:46
run-level 2 2012-08-27 15:46

True

False

10 points   

QUESTION 6

Create an alias called whopw

alias whopw='ypcat passwd | grep `whoami`'

When executed, this alias will output your entry from the system passwd file.

True

False

10 points   

QUESTION 7

What man command option will search the man page short descriptions and man page names for the keyword specified?

Example: man XX disk   -   will search the man pages for the word disk when the correct option is used.

Provide only the option (flag) as your answer below.

(The man page for the man command can help you here.)

10 points   

QUESTION 8

Using the man command, determine which ls command option (flag) will list the name of a directory entry and not the contents.

Which ls command option will do this?

10 points   

QUESTION 9

After executing the following command, will the contents of the file called inside be the same as the contents of the file called outside?

cat > inside < outside

You will have to create a file called outside to test this.

Yes
No

10 points   

QUESTION 10

cd to ~fveglian/midterm. This directory contains a number of files.

A) What combination of options (flags), when used with the ls command, will generate the exact output in the following format?

** Make sure that you use the /bin/ls command. Your search path may not locate this version of the ls command first. **

ls -a

ls -ar

ls -r

ls -arF

-f

-p

--

-i

Explanation / Answer

Question 2

One can instruct the rm command not to follow the end of command line flags by passing double dash -- option before the  file name

Option 3

Question 3

Option 3 .login

Question 5  

- b stands for time of last system reboot

-r stands for the current runlevel

True