Skip to content

Commit 86cbe9d

Browse files
committed
markdown source builds
Auto-generated via `{sandpaper}` Source : c6d9f2e Branch : main Author : Alison Meynert <ameynert@gmail.com> Time : 2025-06-27 17:48:32 +0000 Message : feat: add a section introducing CTRL+A and CTRL+E shortcuts (#364) * feat: add a section introducing CTRL+A and CTRL+E shortcuts * feat: Let learners see the failed command prior to editing.
1 parent ece6395 commit 86cbe9d

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

01-introduction.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,40 @@ pwck pwconv pwd pwdx pwunconv
365365

366366
Displays the name of every program that starts with `pw`.
367367

368+
### Shortcut: Moving to the start or end of a command
369+
370+
Editing a long command can be time consuming. The shell has shortcut keys for moving to the start
371+
or end of a command that you are typing.
372+
373+
Try this command.
374+
375+
```bash
376+
ls home/dcuser/shell_data
377+
```
378+
379+
You will get an error `ls: cannot access 'home/dcuser/shell_data': No such file or directory`.
380+
There should be a `/` at the start of the path.
381+
382+
Use the up arrow to get the previous command again.
383+
Use CTRL+A (hold down the control (CTRL) key and press the A key) to move to the start of the command.
384+
Edit the command to add the missing `/` and hit enter.
385+
386+
```bash
387+
ls /home/dcuser/shell_data
388+
```
389+
390+
Now you decide actually you wanted to see the contents one level down in `sra_metadata`.
391+
392+
Use the up arrow to get the previous command again.
393+
Your cursor will be at the end of the command.
394+
Use CTRL+A to move to the beginning of the command, then CTRL+E to move to the end of the command.
395+
Edit the command to add `/sra_metadata` and now hit enter.
396+
397+
```bash
398+
ls /home/dcuser/shell_data/sra_metadata
399+
```
400+
401+
368402
## Summary
369403

370404
We now know how to move around our file system using the command line.

md5sum.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"LICENSE.md" "e94126b93e27bae014999c2e84ee93f8" "site/built/LICENSE.md" "2025-02-04"
44
"config.yaml" "85dd4502ec34eb1f4ec3dd3f04a061b8" "site/built/config.yaml" "2023-05-08"
55
"index.md" "9fee7090c3acb6ad50fe0dbccf38d31f" "site/built/index.md" "2024-08-15"
6-
"episodes/01-introduction.md" "c0f3f85bf71bfaf19c2b3507d0207378" "site/built/01-introduction.md" "2023-08-15"
6+
"episodes/01-introduction.md" "29b56c984e144486b5d7347ca0e845b2" "site/built/01-introduction.md" "2025-06-27"
77
"episodes/02-the-filesystem.md" "4bbcb23704aa18eb9155a4b80c0997e9" "site/built/02-the-filesystem.md" "2025-06-27"
88
"episodes/03-working-with-files.md" "2c331035e2e8cea65fc0386b2e59b303" "site/built/03-working-with-files.md" "2025-05-30"
99
"episodes/04-redirection.md" "7af92ffeb1bfdc69057917967d8a51ad" "site/built/04-redirection.md" "2025-05-30"

0 commit comments

Comments
 (0)