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

ESTION 1 Match the following LINUX/UNIX commands with what they do. du whereis u

ID: 3908316 • Letter: E

Question

ESTION 1

Match the following LINUX/UNIX commands with what they do.

du

whereis

users

who am i

Estimate file space usage

print the user names of users currently logged in to the current host

locate the binary, source, and manual page files for a command

show that I am logged in

10 points   

QUESTION 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

10 points   

Click Save and Submit to save and submit. Click Save All Answers to save all answers.

      -       A.       B.       C.       D.   

du

      -       A.       B.       C.       D.   

whereis

      -       A.       B.       C.       D.   

users

      -       A.       B.       C.       D.   

who am i

A.

Estimate file space usage

B.

print the user names of users currently logged in to the current host

C.

locate the binary, source, and manual page files for a command

D.

show that I am logged in

Explanation / Answer

1)Answer:

DU:

A.Estimate file space usage

whereis:

C. locate the binary, source, and manual page files for a command

users:

D. show that I am logged in

who am i:

B. print the user names of users currently logged in to the current host