Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me on how to do the code listed below using UNIX. Question (1). Networking commands ping, mount, hosts, netstat 1) The ping command

Please help me on how to do the code listed below using UNIX.

Question (1). Networking commands ping, mount, hosts, netstat

1) The pingcommand can be used to check the network working condition between two systems. You may have to find the path name of the pingcommand file using whichor whereiscommand and then type the full/absolute path name of the pingcommand. Issue pingcommand with UNIX server IP address as argument. If the command does not stop after displaying five packets transfer and receive information, terminate the command using ctrl-c. Otherwise, the command may never stop.

2) The mountcommand without arguments will display the list of mounted local and network file systems on the UNIX system. Find the path name of the mount command file using whichor whereiscommand and then by typing the full/absolute path name of the mountcommand to display the list of mounted file systems.

3) Change working directory to /etc. The file fstab contains the list of file systems to be mounted when the system boots. The file mnttab contains the actual list of file systems that are mounted. Display file attributes and the content of these two files.

4) The file named hostsin the /etc directory contains names of computers (hosts) and their corresponding IP addresses. The first name in the list is called the official name and the remaining names are called aliases. Display the content of the hosts file.

5) Look at the content of the hosts file displayed above, and then using echo command, answer what is the name of the UNIX server that you are using.

Remember the IP address of the UNIX server.

6) The netstatcommand displays information about your network. To test this command, start the DOS command line interface on your PC by running cmdcommand like you did before. (1) Issue netstatcommand. (2) Issue help( ? ) when you are in netstateto see the various options it supports. (3) Identify the option to display the routing table and then issue netstat with that option to display the routing table. Copy and paste the output of netstatsession from the DOS window into your file to be submitted. To exit from DOS window, type exitcommand after copying and pasting the output.

Question (2). Backup and Restore Using cpioand findCommands, output redirection operator > and input redirection operator <. The minimum cpio options you must know are d, i, o, and v.

1) Make your login directory as your working directory

2) Using the findcommand and the cpiocommand, create a backup file called backupcontaining all the files in your login directory. To do backup, pipe the standard output of the findcommand to the cpiocommand and redirect the cpiostandard output to the file named, backuplike find . | cpiooptions> backup. Use appropriate options in the place of optionsin the cpiocommand to do backup. Do not type the word option. Must use verbose optionin addition to other required options so that the list of files being backed will be displayed on the monitor. Make sure you use relative path in the findcommandto generate the list of files with relative path; otherwise you will not be able to restore the files in the restore directory.

3) Display the attributes of the backupfile

4) Create the directory restoreunder your login directory

5) Copy the backupfile from your login directory to the restoredirectory

6) Change working directory to restore

7) Issue pwd command

8) Display the attributes of the files in the restoredirectory

9) Restore the files from the backupfile into the restoredirectory. Redirect input using < operator from backup file to thecpiocommand. Must use verbose option and create directory optionin addition to other required options so that the list of files being restored will be displayed on the monitor and subdirectories will be created.

10) Display the attributes of the files restored files in the restoredirectory

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

1. Describe the types of power that effective leaders employ

Answered: 1 week ago