Question # 1: Practice the following commands in the given sequence and writethe
ID: 3609931 • Letter: Q
Question
Question # 1:
Practice the following commands in the given sequence and writethe result against each given command. You can assume that in thebeginning you are present in the home directory.
· $ mkdir ~/Desktop/CS604
· $ cp ~/Desktop/program.c ~/Desktop/CS604(before running this command you have to create afile yourself with the nameprogram.c on yourdesktop)
· cd Desktop
· $ rmdir CS604
· $rm –r CS604
Question # 2:
You have to give commandsfor each of the following functionality.
Explanation / Answer
Practice the followingcommands in the given sequence and write the result against eachgiven command. You can assume that in the beginning you are presentin the home directory.
· $ mkdir~/Desktop/CS604
this command will make directory name CS604 inDesktop folder.
· $ cp~/Desktop/program.c ~/Desktop/CS604 (before running this commandyou have to create a file yourself with the name program.c on yourdesktop)
This command will copy program.c from Desktop toCS604 directory.
· cdDesktop
current directory to Desktop
· $ rmdirCS604
remove directory CS604
· $rm –rCS604
Remove all files in directory CS604 with thisdirectory
Question #2:
You have to give commands for each ofthe following functionality.
Change your currentdirectory from home to Desktop. (provide complete command)
$ cd ~~/Desktop
Create a directory withthe name CS604 on your desktop. (provide complete command)
$ mkdir~/Desktop/CS604
If you have developed aC program with the name FirstProgram.c then provide the commandthat can compile this program.
After compilation, run the FirstProgram.cprogram.
$ cc -ooutput FirstProgram.c
$./output