Upload
power-girls
View
252
Download
1
Embed Size (px)
DESCRIPTION
SOLTUION CS604_operation systems
Citation preview
Operating System- CS604
Assignment # 1_SOLUTIONSpring 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/OS2. $ 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 Desktop4. $ rmdir OS5. $ rm –r OS
$ mkdir ~/Desktop/CS604Creates 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 DesktopThe current directory of the shell changes to ‘Desktop’. $ rmdir CS604Gives 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