From the course: Linux: Files and Permissions
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Matching files with extended globs - Linux Tutorial
From the course: Linux: Files and Permissions
Matching files with extended globs
- [Instructor] For this exercise, be sure that you're in your globfiles directory. For me, this path is slash home, slash user1, slash exercisefiles, slash ch01 for this chapter, slash globfiles. You can see your paths by typing in pwd. Extended globs may have to be turned on in your version of Linux. To check if they're turned on, type into a terminal, shopt and hit enter. Now look for the extglob shell option. If extglob is not turned on, then type in shopt, space dash S, space extglob and hit enter. To make this persistent, you need to put this line in your bashrc startup file. Let's start exploring extended globs in a simple manner. Type in clear and then type in ls space photo, at symbol, left parentheses and a pattern of abc, right parentheses dot jpg. The at symbol says to match only one occurrence of abc which results in it matching photoabc.jpg. Now let's change it to match zero or one occurrence of abc.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
What is a file?4m 59s
-
(Locked)
Getting information about files5m 29s
-
(Locked)
About extended attributes3m 54s
-
(Locked)
Getting extended attributes4m 14s
-
(Locked)
About file globs5m 9s
-
(Locked)
Using character classes3m 7s
-
(Locked)
Using globs to match files6m 42s
-
(Locked)
Matching with brace expansion6m 11s
-
(Locked)
The Magic of extended globs6m 25s
-
(Locked)
Matching files with extended globs2m 22s
-
(Locked)
Advanced extended globs4m 22s
-
-
-
-
-