When you're matching patterns and basic globs aren't enough, you can turn on a shell option for extended globs. Extended globs allow you to match multi-letter patterns and support logical ORs.
- [Narrator] In addition to standard globs,…bash allows us to use extended globs.…This is an option that may be turned off…in your version of Linux .…Check to see if it's turned on,…type in a terminal, shopt and hit enter.…Look through the list and find extglob…and ensure that's turned on.…If it is not turned on you'll need to type in…shopt -s extglob and hit enter.…To make this persistent, you'll need to…put it in your bash or C startup file.…
Extended globs give us more pattern matching power.…They grant us the power to specify…the number of occurrences to match,…which is difficult to do with standard globs.…They also allow grouping matches.…Patterns can be more than one character.…If we want to match three occurrences of ABC, we could.…They also allow us to match one pattern or another.…With extending globbing we can specify…zero or one occurrences of a match.…For instance, if we want to match zero or one occurrence…of the letters ABC, we'd use file?(abc).txt for our pattern.…
To match one or more occurrence…
- Write the command that will take you to the most recent directory.
- Write the command that brings back the arguments and options from the previous line.
- Explain what extended globs can do.
- Identify the access.conf line that will restrict all users from using the cron service except for the user named bob.
- List the line that will get a list of only running services.
- Identify what typing ‘systemctl enable crond’ will do.
Skill Level Intermediate
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.