From 0c4c5c26c18d898c8b8891f5afbc4b04c405e2f0 Mon Sep 17 00:00:00 2001 From: tomvannuenen Date: Thu, 12 Mar 2026 21:38:56 -0700 Subject: [PATCH] Fix typos and add Windows path documentation - Fix typo: "imgages" -> "images" (issue #3) - Fix inconsistent rm flag documentation: use -r instead of -rf (issue #2) - Add missing line break after Ctrl-C tip (issue #4) - Fix typos: "coputer" -> "computer", "tasts" -> "tasks", "operaters" -> "operators" (issue #5) - Fix typo: "verwrites" -> "overwrites" (issue #6) - Fix typo: "cone" -> "one" (issue #7) - Add Windows/Git Bash path documentation (issue #1) --- README.md | 2 ++ lessons/1_Command_line.md | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d0f226c..878c120 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,8 @@ Before attending the workshop, please ensure you have gone through these instruc You'll need to make sure we can use bash on your computer. * **Windows:** You can install BASH emulator, `Git BASH` via [git for Windows](https://gitforwindows.org). When you are installing Git, choose "Use the Nano editor by default". If you already have another BASH emulator installed (e.g. WSL), we can use your installed program instead. + + **Note:** Git Bash on Windows sets its home directory to `/c/Users/YourUsername` rather than the Windows `C:\` drive root. If you download the workshop materials to your Downloads folder, you can navigate there with `cd ~/Downloads/Command-Line-Fundamentals-main`. Alternatively, you can move the workshop folder to your Git Bash home directory (type `cd ~` then `pwd` to see where that is). * **Mac:** We can use Terminal on Mac. Applications > Terminal * **Linux:** We can use Terminal on most Linux machines. Applications > Terminal diff --git a/lessons/1_Command_line.md b/lessons/1_Command_line.md index db2db79..b2c0c12 100644 --- a/lessons/1_Command_line.md +++ b/lessons/1_Command_line.md @@ -125,10 +125,10 @@ To copy or move files and directories, we use `cp` and `mv`.
🥊**4-4**: Move the `test2.txt` file to a different directory (for example: `images`).
To remove files and directories, we use `rm`.
-* `rm`: Removing a file. Use the `-rf` flag for folders: this is the `-r` flag (recursive) and `-f` flag (force the removal) combined.
+* `rm`: Removing a file. Use the `-r` flag for folders to remove directories recursively.
🥊**4-5**: Navigate to `solutions`, and remove `test.txt`.
-🥊**4-6**: Navigate to `imgages`, and remove `test2.txt`.
+🥊**4-6**: Navigate to `images`, and remove `test2.txt`.
⚠️ **Warning:** DO NOT EVER DO `rm -rf`. This will remove everything from your computer.
@@ -155,7 +155,8 @@ How can we view files? This depends on the type of file we're working with, whic Let's move to `data` folder and use `cat` and `less` to read `workshops.txt` file.
🔔 **Question:** When should we use `less` instead of `cat`?
-💡 **Tip**: `Ctrl-C` will abort process. This shortcut comes in very handy! +💡 **Tip**: `Ctrl-C` will abort process. This shortcut comes in very handy!
+ These commands are useful for quickly viewing files, but how about editing files? There are several programs in bash you can use to do this: `vim`, `nano`, and `emacs` are some examples. @@ -181,9 +182,9 @@ This is what the command line interface with Nano looks like: --- ## 6. Dealing with outputs: Pipes and redirection -One of advantages of using the command line interface is the flexibility in interacting with the coputer when doing complex tasts. Redirection and pipes are two important operaters that allow simplifying workflows and automating tasks. -* **Redirection** (`>`, `>>`): Sends the output of a command to a file. `>` redirects output and verwrites the content of the specified file. `>>` appends the output to the end of the specified file without overwriting its existing contents. It also creates the file if it does not exist. -* **Pipes** (`|`): Connects the output of cone command to the input of another.
+One of advantages of using the command line interface is the flexibility in interacting with the computer when doing complex tasks. Redirection and pipes are two important operators that allow simplifying workflows and automating tasks. +* **Redirection** (`>`, `>>`): Sends the output of a command to a file. `>` redirects output and overwrites the content of the specified file. `>>` appends the output to the end of the specified file without overwriting its existing contents. It also creates the file if it does not exist. +* **Pipes** (`|`): Connects the output of one command to the input of another.
🥊**6-1**: save a list of files in the working directory as “filenames.txt”