Ask Question, Ask an Expert


Ask Operating System Expert


1) Learn about compiling, linking, creating executable and running program
2) Get more experience about process, fork, getpid, and getppid
3) Learn to create makefile and use make utility, which are used in software development
4) Learn to modify PATH shell variable to search a new directory
5) Learn to use ftp to do file transfer between two systems
6) Learn to use whereis and which commands
7) Learn to use networking commands (utilities) such as ftp, rwho, finger, mailx, mount,  and ping
8) Learn to create a backup and restore using cpio and find commands with pipe or tar command

 Make Utility – Commands: make, pwd, mkdir, cd, ls, touch, cat, PATH

1) Create the directory hw4q1make under your login directory.
2) Copy one of your working C programs in homework #2 or homework #3 Q1 or Q2 program into hw4q1make directory.  If you do not have a working program, then create a simple and small/trivial program, like the “Hello World” that you see in a programming book to do this homework.
3) Change working directory to hw4q1make.
4) Exit from script, if it enabled.
5) Using vi editor, create the makefile to produce that will produce an executable file for the C programs in the directory.  In the makefile, there should be a target to create the object module ( .o file ) with compile only command ( cc –c ) and another target to generate the final executable file by linking the object module.
6) Enable script to start capturing output for the steps below.
7) Display the current working directory to ensure it is hw4q1make directory
8) Display the attributes of the files in the directory
9) Display the content of makefile
10)Build the executable by issuing make command.
11) Display the attributes of files in the directory
12) Modify the PATH shell variable to search hw4q1make directory for command as shown below (type it on the command line and do not modify .profile):
PATH=$PATH:/usr/home/your login name/hw4q1make
13) Change working directory to another directory
14) Issue current working directory
15) Run the program by typing just the executable program filename. Supply argument to the program (command), if necessary.
16) Change working directory to hw4q1make
17) Issue make command again
18) Issue touch command on the C source program file to change the modification date to current time
19) Issue the make command again.  Observe that the C program gets compiled; object file and the executable files are recreated since the dependent C program file has been modified by the touch command.

ftp – ftp commands

You should try to do this problem from your PC (laptop).  Run cmd command to start the DOS command interface window on your laptop by clicking on Start, then run and then typing cmd and pressing Enter.

Issue ftp command from DOS window with UNIX server IP address to start the client ftp, establish a session (connection) with the server and login to the server.  Issue appropriate ftp commands to perform the following tasks.

1) Issue help or ? command to get the list of ftp commands.
2) Issue stat ftp command and make sure the transfer mode is ASCII.  If current mode is BINARY, issue ASCII command to change mode to ASCII.
3) Issue ls (lst) ftp command
4) Using get (or recv) ftp command, get a file from your login directory into your PC local directory. Give name to the file to be stored on the PC different from the file on the server.
5) Create a directory called ftptest under your login directory using mkdir command
6) Change the working directory to ftptest using cd (or cwd) command
7) Issue pwd ftp command.
8) Using put (or send) ftp command, send the file you have received in Step (3) above to the ftptest directory.
9) Issue ls (lst) ftp command.
10) Delete the file in the ftptest directory using delete ftp command.
11) Issue ls (lst) ftp command.
12) Issue cd (or cwd) ftp command to change working directory to your login directory.
13) Delete the ftptest directory using rmdir ftp command.
14) Issue ls (lst) ftp command.
15) Issue quit ftp command to logout from the ftp session.
To exit from DOS window, type exit command after copying and pasting the output.

NOTE: If you are unable to login to the server from your ftp session on the PC, then login to the server using PuTTY. Start the script. Then, issue ftp command and perform the above steps. After issuing the quit ftp command, stop the script command and save the output.

Networking commands – mailx, finger, rwho, ps, grep, ping, mount, netstat, cat

1) Send mail to yourself using mailx command
2) Read the mail you sent to yourself
3) Issue finger command with your login name.  Finger will work for local and remote users.
4) Issue rwho command.  The rwho command will display users logged on remote systems and local systems, if rwhod daemon is running and system is configured to send the info over the network.
5) Issue ps –e command and pipe the output to grep command with rwhod as the search pattern/string.
6) Look at the output of the grep command.  With echo command, answer whether the rwhod daemon is running on the UNIX server.
7) The ping command can be used to check the network working condition between two systems.  You may have to find the path name of the ping command file using which or whereis command and then type the full/absolute path name of the ping command.  Issue ping command 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. 
8) The mount command 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 which or whereis command and then by typing the full/absolute path name of the mount command to display the list of mounted file systems.
9) Identify the file that has the list of file systems to be mounted when the UNIX system boots. Hint: This file is located in the /etc directory and the filename ends with tab. Change to the /etc directory and then issue ls command to display filename ending with tab ONLY.  Display the content of the appropriate file containing the list of file systems to be mounted.
10) The file named hosts in 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.
11) Look at the content of the hosts file displayed above, and then using echo command, answer what is the name of the UNIX server at FSU that you are using.
12) The netstat command displays information about your network.  To test this command, start the DOS command line interface on your PC by running cmd command like you did before.  (1) Issue netstat command.  (2) Issue help ( ? ) when you are in netstate to 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 netstat session from the DOS window into your file to be submitted. To exit from DOS window, type exit command after copying and pasting the output.

Backup and Restore Using cpio and find Commands.

1) Make your login directory as your working directory
2) Using the find command and the cpio command, create a backup file called backup containing all the files in your login directory.  To do backup, pipe the standard output of the find command to the cpio command and redirect the cpio standard output to the file named, backup like find . | cpio options > backup.  Use appropriate options in the place of options in the cpio command to do backup.  Must use verbose option in 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 find command to generate the list of files with relative path.
3) Display the attributes of the backup file
4) Create the directory restore under your login directory
5) Copy the backup file from your login directory to the restore directory
6) Change working directory to restore
7) Issue pwd command
8) Display the attributes of the files in the restore directory
9) Restore the files from the backup file into the restore directory. Redirect input using < operator from backup file to the cpio command.  Must use verbose option in addition to other required options so that the list of files being restored will be displayed on the monitor.
10) Display the attributes of the files restored files in the restore directory.

Operating System, Computer Science

  • Category:- Operating System
  • Reference No.:- M9594

Have any Question? 

Related Questions in Operating System

Operating systems- homeworkpurposethe purpose of this

Operating Systems- Homework Purpose The purpose of this exercise is to understand how creating files affects the available disk space and the available i-nodes on a disk partition on Linux/UNIX. Assignment Create and lea ...

Firewall linux-a simple firewall is a filter which blocks

Firewall (Linux)- A simple firewall is a filter which blocks the packets based on the pre-defined filter rules. There are two general strategies to set-up a filter. One strategy is restrictive firewall which blocks all p ...

Question 1an important service provided by any system is

Question 1: An important service provided by any system is the ability to run a process on a predetermined schedule without human intervention. The "automation" of tasks can reduce the workload of the system administrato ...

Web server practical-1 you are required to configure and

Web Server Practical- 1) You are required to configure and test a Web server to provide web hosting services to a client computer. Install and configure a web server, serving out a default web page that you have created. ...

Lab-file processingobjectivesbulladd persistent data

Lab-File Processing OBJECTIVES • Add persistent data storage to your Week 4 Lab using text file input/output. PROBLEM: Stocks4U Portfolio Management System The portfolio management system you developed for Stocks4U needs ...

Goals1 to gain hands-on experience with fork exec and wait

Goals: 1. To gain hands-on experience with fork(), exec(), and wait() system calls. 2. To master the basics of multi-process application development. 3. To appreciate the performance and fault-tolerance bene_ts of multi- ...

Ios questions150 - 200 words per question no less due in 15

iOS Questions 150 - 200 words per question, no less. Due in 15 hours. 1. What's a Development Provisioning Profile? 2. What are some Application Resource Constraints when developing an iOS app? 3. What are some iOS hardw ...

Purpose of this assignmentthe purpose of this written

Purpose of this assignment: The purpose of this written assignment is to verify students' knowledge on some of the topics covered in the second half of the course: The Device Handler, File management, Deadlock, UNIX/Linu ...

Primary discussion responseprimary discussion response your

Primary Discussion Response Primary Discussion Response: Your classmates, your instructor, and you have been working together over the session as a team. Through discussion board tasks and individual projects, you have s ...

Operating system proposalobjectivesyour organization is

Operating System Proposal Objectives Your organization is right now researching the utilization of Linux. Your supervisor has solicited you to look into the possibility from utilizing Linux as a part of both the server a ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate