Intro to Bash (Activity)
(Difference between revisions)
(→Suggestions for the Open Source Project:) |
m |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | {| | + | |
+ | {| class="wikitable" | ||
|- | |- | ||
− | |'''Title''' || Bash Activity | + | | '''Title''' || Bash Activity |
|- | |- | ||
− | |'''Overview''' || Students issue commands and observer their results. | + | | '''Overview''' || Students issue commands and observer their results. |
|- | |- | ||
− | |'''Prerequisite Knowledge''' || None | + | | '''Prerequisite Knowledge''' || None |
|- | |- | ||
− | |'''Learning Objectives''' || Use a bash terminal to... | + | | '''Learning Objectives''' || Use a bash terminal to... |
* Create files | * Create files | ||
Line 24: | Line 25: | ||
|} | |} | ||
− | === Background | + | === Background === |
− | === Directions | + | === Directions === |
Line 70: | Line 71: | ||
# What does `..` mean in `cd ..`? | # What does `..` mean in `cd ..`? | ||
# When do you use `rm -r A` instead of `rm A`? | # When do you use `rm -r A` instead of `rm A`? | ||
− | |||
Line 77: | Line 77: | ||
Run each statement below in a bash terminal. Then answer the questions below (or as you go). | Run each statement below in a bash terminal. Then answer the questions below (or as you go). | ||
− | + | <nowiki> | |
man | man | ||
man man # Press `space` to page down, `b` to go back, `q` to quit. | man man # Press `space` to page down, `b` to go back, `q` to quit. | ||
Line 90: | Line 90: | ||
− | + | === Deliverables === | |
− | === Deliverables | + | |
Answer to questions. | Answer to questions. | ||
− | === Assessment | + | === Assessment === |
− | === Comments | + | === Comments === |
=== Additional Information: === | === Additional Information: === | ||
− | {| | + | |
+ | {| class="wikitable" | ||
|- | |- | ||
− | |'''Knowledge Area/Knowledge Unit''' || | + | | '''Knowledge Area/Knowledge Unit''' || |
|- | |- | ||
− | |'''Topic''' || | + | | '''Topic''' || |
|- | |- | ||
− | |'''Level of Difficulty''' || Beginner | + | | '''Level of Difficulty''' || Beginner |
|- | |- | ||
− | |'''Estimated Time to Completion''' || 20-30 min | + | | '''Estimated Time to Completion''' || 20-30 min |
|- | |- | ||
− | |'''Materials/Environment''' || Bash shell. | + | | '''Materials/Environment''' || Bash shell. |
|- | |- | ||
− | |'''Author''' || Stoney Jackson | + | | '''Author''' || Stoney Jackson |
|- | |- | ||
− | |'''Source''' || | + | | '''Source''' || |
|- | |- | ||
− | |'''License''' || CC BY-SA 4.0 | + | | '''License''' || CC BY-SA 4.0 |
|} | |} | ||
Line 126: | Line 126: | ||
[[Category:Communication and Tools]] | [[Category:Communication and Tools]] | ||
[[Category:CS1]] | [[Category:CS1]] | ||
+ | [[Category:Good Draft]] |
Revision as of 18:36, 4 February 2017
Title | Bash Activity |
Overview | Students issue commands and observer their results. |
Prerequisite Knowledge | None |
Learning Objectives | Use a bash terminal to...
|
Background
Directions
Filesystem
Run each statement below in a bash terminal. Then answer the questions below (or as you go).
ls touch f1 ls mv f1 f2 ls cp f2 f1 ls rm f2 ls mkdir d1 mv f1 d1 ls ls d1 pwd cd d1 pwd ls cd .. pwd ls rm d1 # fails rm -r d1
- What does `ls` display?
- What does `mv A B` do if `B` ___is not___ a directory?
- What does `mv A B` do if `B` is a directory?
- What does `cp A B` do if `B` ___is not___ a directory?
- What does `rm A` do if `A` is a file?
- What does `mkdir A` do?
- What does `pwd` display?
- What does `ls A` display if `A` is a directory?
- What does `cd A` do?
- What does `cd ..` do?
- What does `..` mean in `cd ..`?
- When do you use `rm -r A` instead of `rm A`?
Getting Help
Run each statement below in a bash terminal. Then answer the questions below (or as you go).
man man man # Press `space` to page down, `b` to go back, `q` to quit. man ls man cd # Unexpected result. help cd
- What does `man` do?
- What does `help` do?
- Use `man` to confirm answers in previous section.
Deliverables
Answer to questions.
Assessment
Comments
Additional Information:
Knowledge Area/Knowledge Unit | |
Topic | |
Level of Difficulty | Beginner |
Estimated Time to Completion | 20-30 min |
Materials/Environment | Bash shell. |
Author | Stoney Jackson |
Source | |
License | CC BY-SA 4.0 |
Suggestions for the Open Source Project:
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License