0% found this document useful (0 votes)
495 views

Spring 2010 - CS604 - 1 - Solution

This document provides instructions for an operating systems assignment. Students are asked to [1] practice basic Linux commands like mkdir, cp, cd, rmdir and rm on their desktop directories, [2] write the results of these commands, and [3] write additional commands to list files, change directories, display the current directory path, and create a new directory. The assignment is due by April 30th and students should avoid plagiarism by submitting their own work through the university's online system.

Uploaded by

Power Girls
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC or read online on Scribd
0% found this document useful (0 votes)
495 views

Spring 2010 - CS604 - 1 - Solution

This document provides instructions for an operating systems assignment. Students are asked to [1] practice basic Linux commands like mkdir, cp, cd, rmdir and rm on their desktop directories, [2] write the results of these commands, and [3] write additional commands to list files, change directories, display the current directory path, and create a new directory. The assignment is due by April 30th and students should avoid plagiarism by submitting their own work through the university's online system.

Uploaded by

Power Girls
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC or read online on Scribd
You are on page 1/ 2

Operating System- CS604

Assignment # 1_SOLUTION
Spring 2010
Marks: 20
Due Date
Your assignment must be uploaded before or on 30th April 2010.
Objective
The objective of this assignment is to familiarize with the Linux environment and help you in
understanding and using some user commands.

Instructions
 Avoid Plagiarism. No marks will be given in case of cheating or copying from the internet
or from other students.
 Submit the assignment through your account on VULMS. No assignment will be accepted
through email after the due date.

 If you have any problem related to assignment, feel free to discuss it by email at
[email protected]

Question # 1:
Practice the following commands in the given sequence and write the result against
each given command. You can assume that in the beginning you are present in the
home directory.
1. $ mkdir ~/Desktop/OS
2. $ cp ~/Desktop/myprogram.c ~/Desktop/CS604 (before running this
command you have to create a file yourself with the name my program.c on your
desktop)
3. cd Desktop
4. $ rmdir OS
5. $ rm –r OS

• $ mkdir ~/Desktop/CS604
Creates a directory with the name CS604 on desktop.
• $ cp ~/Desktop/program.c ~/Desktop/CS604 (before running this command you
have to create a file yourself with the name program.c on your desktop)
The file ‘program.c’ gets copied from desktop into the folder of CS604
• cd Desktop
The current directory of the shell changes to ‘Desktop’.
• $ rmdir CS604
Gives an error: “failed to remove ‘CS604’; Directory not empty”
This showed that rmdir is used only to remove/ delete empty folders/
directories.
• $rm –r CS604
This command will delete the CS604 directory from the desktop.

Question # 2:
Write commands for each of the following functionality.

1. Write command to show all files and directories

$ ls

2. Change your current directory from home to Desktop.

cd Desktop

3. Write a command display the path of the current directory.

$ pwd
4. Create a directory with the name OS on your desktop.

mkdir OS

5. Write a command to change to parent directory.


$ cd ~Parent

You might also like