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

UNIX/LINUX Answers are case-sensitive . 1) Write a single command line that will

ID: 3770082 • Letter: U

Question

UNIX/LINUX

Answers are case-sensitive.

1)   Write a single command line that will search the file /tmp/MCSE for the pattern “MCSE”?

2)   Write a single command line that will change the permissions on your home directory so that you and members of your group can change into it, but others cannot.

3)   What command will show the amount of free disk space on the file systems attached to the server?

4)   Read the man page for tcpdump and provide the command and accompanying options required to read the file named /tmp/tcpdump.dmp, suppress name resolution (avoid DNS lookups), and print each packet in both hex and ASCII.

5)   Write a single command line that defines the variables N=444, M=555, O as the product (multiple) of N and M, and then echoes the value of O.

6)   Write a single command line that uses netstat and grep to count all connections in a state of “ESTABLISHED” and outputs a single number representing how many connections are currently open to the server.

7)   Write a short, interactive shell script that
a.   Asks the user for a numeric variable A
b.   Asks the user for a numeric variable B
c.   Echoes the text “A minus B equals:”
d.   Prints the value of a variable C which is A minus B

8)   Write a short, interactive shell script that:
a.   Asks the user to enter an IP address
b.   Performs a host lookup on the IP address and returns a name if available.
Note: I will test this using 72.14.204.104

9)   Write a short, interactive shell script that
a.   Asks the user to enter a host name (like www.google.com)
b.   Performs a traceroute on the host and then outputs a single line stating “The host %HOSTNAME is ____ Hops Away” where the ____ is the number of hops. (I will test this using www.google.com)

Explanation / Answer

Multiple Questions : Answering 1st Question.

-r or -R is recursive, -n is line number and -w stands match the whole word.

In this case : grep -rnw '/tmp/MCSE' -e "MCSE"

-r or -R is recursive, -n is line number and -w stands match the whole word.

Please post each questions different.