Terminal Basics Exercises
Write the following terminal commands to perform the following tasks:
Part I
- make a directory called
first - change directory to the
firstfolder - create a file called
person.txt - change the name of
person.txttoanother.txt - make a copy of the
another.txtfile and call itcopy.txt - remove the
copy.txtfile - make a copy of the first folder and call it
second - delete the
secondfolder
Part II
- What does the
helpcommand do? Type inhelp rm. How do you scroll and get out? - Look at the
helppage forls. What does the-lflag do? What does the-aflag do? - Type the following command to download and save the contents of google.com:
curl https://www.google.com > google.html - Use
lessto look at the contents ofgoogle.html. - Look at the
helppage forless. Read the section on/pattern. Search for the text hplogo in the google.html file. - How do you jump between words in the terminal?
- How do you get to the end of a line in terminal?
- How do you move your cursor to the beginning in terminal?
- How do you delete a word (without pressing backspace multiple times) in terminal?
- What is the difference between a
terminalandshell? - What is an
absolute path? - What is an
relative path? - What is a
flag? Give three examples of flags you have used. - What do the
randfflags do with thermcommand?
You can find the solutions here