More Bash Commands

Do some research (e.g. Googling) to find and define the following commands. For each of them, answer the following questions in a new text file:

  • Does this command require arguments? If so, what are they?
  • How could this command be useful?

Try out the commands in Git Bash to see them in action!

Commands

clear

date

less

cat

mkdir

touch

whoami

mv

yes

nano

wc

Exercises

After researching the commands above, try to complete the following tasks using the command line. You should be able to complete all of them without using a GUI. Note, some of these tasks will require commands you have not seen. Use Google to figure out which commands you will need!

  1. Change the working directory to the CommandLineLesson folder
  2. Create a new text file in the directory called "Test.txt"
  3. Edit the text file and add a few lines to it
  4. Copy the file into another file called "Test2.txt"
  5. Create a new directory inside of CommandLineLesson called Files
  6. Move Test2.txt into the Files folder
  7. Delete the Test.txt file
  8. Print out the contents of the Test2.txt file
  9. Count how many lines and words are in the Test2.txt file
  10. Print out the full list of recently-used commands

Challenge

If you finish all of the exercises (checked by an instructor), you can attempt to solve this challenge:

http://web.mit.edu/mprat/Public/web/Terminus/Web/main.html

results matching ""

    No results matching ""