Let’s play with the Command Line!
We got an introduction to the Command Line in The Foundation Program! Knowing how to use the command line is a great skill that you can possess. Here’s a small assignment for you. Feel free to discuss the assignment in your learning circle whatsapp group.
- The assignment has to be done strictly using a PC.
- Head over to this link
- Download the file (remember the path where you’re downloading it to 😉 )
- Once the download is complete, change directory over to the downloaded file’s directory using the command line.
- Unzip the file using your command line. (Google and find out the command to unzip a file using the command line, yes, googling is the key to success 😎 )
- Once the file is unzipped, you’ll be able to view a folder named
super_directory
- In it you’ll find two folders named
lightning
and personal
- Change directory into the folder named
lightning
create another directory called thor
, change directory into thor, create a file called god_of_thunder.txt
- To the newly created file, add the text, “THIS DRINK, I LIKE IT! ANOTHER!”
- Print out the contents of god_of_thunder.txt onto the terminal.
- Now find the other directory which was in the zipped file, called
personal
- Rename the personal directory with your name. (do not add spaces in while renaming. Keep it like, eg:
bijoy_sijo
, you can use underscores to separate the words)
- Inside your renamed directory, create a new directory with the name of your college.
- Change into your college directory, create another directory with the name of your department. In your department directory create a file called
i_love_college.txt
- Change back to the
super_directory
directory.
- Do a
tree
of the super_parent directory. Take a screenshot and save it with an appropriate name. (If the tree command doesn’t seem to work for you, Google how to install tree command in your shell)
- Once the screenshot is saved, find where you saved the screenshot 😂 , move / copy the screenshot into the super_parent directory.
- Use the command
history
in your terminal, take a screenshot of the part which contains the commands you used to do this assignment, give it an appropriate name, again, find where the screenshot is saved, move / copy the screenshot into the root of the super_parent directory.