Question

In: Computer Science

Here are the tasks for this assignment: 1. Write a bash command line to determine if...

Here are the tasks for this assignment:
1. Write a bash command line to determine if the server 'syccuxfs01.pcc.edu'
is reachable from the syccuxas01.pcc.edu server.

2. As you have read, TCP/IP messages are passed from one device to another
until the message reaches its destination.

Write a bash command line that will verify that no more than two (2)
network devices are used to pass messages from the syccuxas01.pcc.edu
server to the www.pcc.edu server.

3. Write a bash command line that will list all of the processes on this
server that have established a network connection to IP address
181.31.171.254

Solutions

Expert Solution

Answer 1
***********

nc -z syccuxas01.pcc.edu 80 2>/dev/null; echo Success

Answer 2
**********

ping -c 2 www.pcc.edu ; echo $?

Where

0 means host reachable
>0 means unreachable

Answer 3
***********

sudo netstat -anp | grep 181.31.171.254

As i have no established connection with the given ip i have shown with my loopback ip in above

if you have any doubt then please ask me without any hesitation in the comment section below , if you like my answer then please thumbs up for the answer , before giving thumbs down please discuss the question it may possible that we may understand the question different way and we can edit and change the answers if you argue, thanks :)


Related Solutions

UNIX ONLY Write a bash script that will accept a filename as a command line argument....
UNIX ONLY Write a bash script that will accept a filename as a command line argument. Your script should first check whether the filename has been passed as argument or not (hint: at least one argument has to be provided). If no argument has been provided your script should display appropriate message and exit. If a file name has been provided, your script should check if the file exists in the current directory and display the contents of the file....
write a bash shell program named L1 as follows . L1 expects exactly 2 command line...
write a bash shell program named L1 as follows . L1 expects exactly 2 command line arguments. expects $1 to contain only digits. expects $2 to have exactly 4 characters (can be any character). if NOT exactly 2 command line arguments, echo "need 2 args " and exit. otherwise, if $1 and/or $2 have incorrect value(s) (as above), echo "bad argX", where X is the first incorrect argument, and exit. otherwise, echo "good ". you can use echo,grep, pipe to...
1. Write a bash command that will display the value of all environment variables defined in...
1. Write a bash command that will display the value of all environment variables defined in your shell process, sorted in alphabetical order, and numbered. Here is a sample of the type of output your command should produce: 1 } 2 ALSA_CONFIG_PATH=/etc/alsa-pulse.conf 3 AUDIODRIVER=pulseaudio 4 BASH_FUNC_mc%%=() { . /usr/share/mc/mc-wrapper.sh 5 COLORTERM=1 2. Write a bash command that will display the value (and only the value) of the JAVA_ROOT environment variable. Here is a sample of the type of output your...
this is bash scripting. a. Explain the difference between grep and egrep? b. Write a command...
this is bash scripting. a. Explain the difference between grep and egrep? b. Write a command to list files where third letter is x or y? c. Write command to remove array element with id 5
**Need to use awk command in putty (should be a ONE LINE COMMAND) Write the command...
**Need to use awk command in putty (should be a ONE LINE COMMAND) Write the command that would find all lines that have an email address and place a label email = before the line in the file longfile output will multiple lines similar to this one : using a good awk command the output would be something like this email = From: "Linder, Jann/WDC" <[email protected]> email = To: Mr Arlington Hewes <[email protected]> email = > From: Mr Arlington Hewes...
Here we will be taking data in as a file instead of from the command line...
Here we will be taking data in as a file instead of from the command line (no cin). Note that the sample file provided here is not the file that I will use to grade your assignment but the formatting will be the same. File input is very similar to how data comes in from the user through cin (using the same operators) but we will need to setup the stream ourselves. First we need to include <fstream> at the...
Building a Command Line Interpreter (myshell) 1.Goal of this programming assignment The primary goal of this...
Building a Command Line Interpreter (myshell) 1.Goal of this programming assignment The primary goal of this assignment is to understand and gain some familiarity with the system call interface in Unix Environment. In this assignment you will be implementing your own command line interpreter like a Unix shell program. YOU ARE NOT IMPLEMENTING COMMANDS! YOUR program should just FORK off programs and EXECUTE them. 2. Requirements (1) Programming language: You have to use either C or C++ to develop your...
Assignment Tasks This assignment consists of three parts as follows (100 marks): Part 1(30 marks): Write...
Assignment Tasks This assignment consists of three parts as follows : Part 1: Write a report of 300 words that covers the following:  Fixed Cost  Variable Cost  Profit Part 2 : Solve the following questions by completing the required calculations:  A factory has fixed cost of RO 10,000 and produces 500 units of a product at a variable cost of RO 75 per unit. Calculate Total Cost of the factory  Calculate variable cost per unit...
Introduction Write in C++ at the Linux command line a program that is the same as...
Introduction Write in C++ at the Linux command line a program that is the same as the previous collection app project but now uses a class to store the items and also can save the items to a file that can be read back into the array by the user when the program is re-started. You can use your project 1 submission as a starting point or you can do something new as long as it meets the listed requirements....
1. What command is used to change the current working directory at the command line?
1. What command is used to change the current working directory at the command line?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT