Often you have to type in the same command multiple times. You can either use our up/down arrow keys or preferably use the shell history. Learn how to execute commands on certain lines of the history. Learn how to re-execute entire lines as well as appending the arguments from the previous line onto our current one.
- [Instructor] Using the shell's history can keep you from…having to type in commands over again.…If you want to just bring up the last command,…you may want to use your up and down arrow keys.…If you want to see what commands you've typed in,…use the history command, by typing in history into a shell.…History shows the most recent commands we've typed,…up to the shell limit.…The limit is usually 500 or 1,000 items,…depending on the configuration.…If you want to bring back the entire last line…from the history, type in !!…and hit enter.…
In my case, it's the history command,…which we just typed in.…If you want to execute the command…four lines from the bottom,…you'll use !-4…and hit enter.…Type in history again to see the list.…We can see that four lines from the bottom…was the clear command for me.…For you, it may be something else.…If you want to run a specific line,…just specify the number after the !…For instance, to run the command on line seven,…you would type in !7 and hit enter.…
If you do not have a seventh item,…
- Topics include:
- Shell tips and tricks
- Pattern matching with globs
- Pattern matching with extended globs
- Using the Bash shell
- Monitoring processes using ps
- Monitoring processes graphically
- Managing processes
- Job scheduling
- Limiting access to AT and cron jobs
- Managing system services
Skill Level Intermediate
Learning Linux Command Line (2016)with Scott Simpson1h 38m Beginner
Linux: User and Group Managementwith Grant McWilliams1h 8m Intermediate
1. Linux Shells Overview
2. Using the Bash Shell
3. Linux Processes
4. Job Scheduling
5. System Services
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.