Link Search Menu Expand Document

Practical 1: Bash Commands

Each person will create a sequence of bash commands that does the following:

  1. Move to your home directory
  2. List the contents of your home directory
  3. Create a new directory called foo
  4. Move into foo
  5. Create a new text file in foo called bar.txt
  6. Add the line “Hello BWSI 2019!” to the file bar.txt
  7. Append the line “My name is __” to bar.txt
  8. Display the contents of bar.txt
  9. Move up one directory, create a hidden directory called hoo, and move bar.txt into the hidden directory hoo
  10. Delete bar.txt from directory .hoo

Run these commands in Terminal if possible.

Back to top

© Copyright 2022 MIT Beaver Works Summer Institute.