In: Computer Science
QUESTION 1
Match the following LINUX/UNIX commands with what they do.
|
|
QUESTION 2
What rm command option (flag) would you use to remove a file that begins with a - (hyphen)?
-f |
||
-p |
||
-- (read this as dash dash) |
||
-i |
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?
Provide only the correct file name.
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?
QUESTION 5
Reference the man page for the who
command.
Which flags (options) when used with the who
command will generate the following output?
The output will resemble the following. The date and time may be different.
system
boot 2015-05-16 09:04
run-level 2
2015-05-16 09:04
Question 1:
ANS:
Here I have arranged the usage of commands in appropiate way.
Command Purpose
du summarize disk usage
whereis locate the binary, source, and manual page files for a
command
users display a compact list of users currently logged in.
who am i who am i currently logged in as on the Linux server.
Question 2:
rm command is used to remove each specified FILE.
We are using diffrent options for different purposes.
As per your question,We need to use '_f' to remove that file forcebly and without prompting anything.
So '-f 'is the correct answer.
Question5:
The who command used to get the information about all users who are currently logged in.
Syntax: who [ OPTION ]... [ FILE ].
Options:
-a dislpays all users accessing
-b Display the time of the last system boot.
-d Display dead processes.
-h Print a line of column headings.
--ips Print IP addresses instead of hostnames.
--lookup Attempt to canonicalize hostnames via DNS
-p Print active processes spawned by init.
-q Displays all login names, and a count of all logged-on
users.
And we also have few more options.
By using '-b' option we can get last system time boot.
So that the flag is '-b'