Skip to content

Commit ba174a4

Browse files
committed
differences for PR #364
1 parent ed7e380 commit ba174a4

2 files changed

Lines changed: 33 additions & 1 deletion

File tree

01-introduction.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,38 @@ 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 typing this command, but don't hit enter yet.
374+
375+
```bash
376+
ls home/dcuser/shell_data
377+
```
378+
379+
Notice that there is an error: there should be a `/` at the start of the path.
380+
381+
Use CTRL+A (hold down the control (CTRL) key and press the A key) to move to the start of the command.
382+
383+
Edit the command to add the missing `/`, but don't hit enter yet.
384+
385+
```bash
386+
ls /home/dcuser/shell_data
387+
```
388+
389+
Now you decide actually you wanted to see the contents one level down in `sra_metadata`.
390+
391+
Use CTRL+E to move to the end of the command.
392+
393+
Edit the command to add `/sra_metadata` and now hit enter.
394+
395+
```bash
396+
ls /home/dcuser/shell_data/sra_metadata
397+
```
398+
399+
368400
## Summary
369401

370402
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" "0b29daac7967eb6c7b45d1c25e5800ef" "site/built/01-introduction.md" "2025-05-23"
77
"episodes/02-the-filesystem.md" "70b53ce6f53a88f931e492d876c60fa1" "site/built/02-the-filesystem.md" "2023-05-08"
88
"episodes/03-working-with-files.md" "6989deaa6d2a3b387212bff8b5d104f0" "site/built/03-working-with-files.md" "2023-05-08"
99
"episodes/04-redirection.md" "3f71f2fad3303b1be957191c95bae2f7" "site/built/04-redirection.md" "2024-03-14"

0 commit comments

Comments
 (0)