You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For me, the 'Using history' section in Episode 3 Working with Files and Directories is text heavy and in one large paragraph chunk, that jumped between 'history' actions and 'Ctrl + r' actions. I found it somewhat confusing to follow and think it could be re-structured to improve readability and clarity for learners. Therefore, I suggest amending the structure as follows (including line breaks to break up the text), and some minor changes for clarity:
Use the history command to see a list of all the commands you’ve entered during the current session.
Type 'history' into the shell.
If you want to save your history, maybe to extract some commands from which to build a script later on, you can do that with:
[In Bash purple box]
history > history.txt
This will output all history to a text file called history.txt in your working directory that you can later edit.
To recall a command from history, type history. Note the command number of the relevant command, e.g. 2045. Recall the command by entering !2045. This will execute the command.
You can also use Ctrl + r to do a reverse lookup of a command. Press Ctrl + r, then start typing any part of the command you’re looking for, e.g. head ... The past command will autocomplete.
Press enter to run the command you have selected again, or press the arrow keys to start editing the command.
If multiple past commands contain the text you input, you can Ctrl + r repeatedly to cycle through them to find the one you want.
If you can’t find what you’re looking for in the reverse lookup, use Ctrl + c to return to the prompt.
The text was updated successfully, but these errors were encountered:
https://librarycarpentry.org/lc-shell/03-working-with-files-and-folders.html#using-history
For me, the 'Using history' section in Episode 3 Working with Files and Directories is text heavy and in one large paragraph chunk, that jumped between 'history' actions and 'Ctrl + r' actions. I found it somewhat confusing to follow and think it could be re-structured to improve readability and clarity for learners. Therefore, I suggest amending the structure as follows (including line breaks to break up the text), and some minor changes for clarity:
Use the history command to see a list of all the commands you’ve entered during the current session.
Type 'history' into the shell.
If you want to save your history, maybe to extract some commands from which to build a script later on, you can do that with:
[In Bash purple box]
history > history.txt
This will output all history to a text file called history.txt in your working directory that you can later edit.
To recall a command from history, type history. Note the command number of the relevant command, e.g. 2045. Recall the command by entering !2045. This will execute the command.
You can also use Ctrl + r to do a reverse lookup of a command. Press Ctrl + r, then start typing any part of the command you’re looking for, e.g. head ... The past command will autocomplete.
Press enter to run the command you have selected again, or press the arrow keys to start editing the command.
If multiple past commands contain the text you input, you can Ctrl + r repeatedly to cycle through them to find the one you want.
If you can’t find what you’re looking for in the reverse lookup, use Ctrl + c to return to the prompt.
The text was updated successfully, but these errors were encountered: