From the course: Linux: Files and Permissions
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Advanced extended globs - Linux Tutorial
From the course: Linux: Files and Permissions
Advanced extended globs
- [Instructor] We'll be running these commands in our globfiles directory again. For me, that is in /home/user1/ExerciseFiles/ Ch01 for chapter one, /globfiles. Let's do something standard globs can't do. Let's create two patterns matching the beginning and the end of a file name, and then group that together and invert it. Type in ls -d !, left parentheses, @, left parentheses, photo|video, right parentheses *@, left parentheses.jpg|.png, right parentheses, right parentheses. Take a moment to visualize what this will show. When done, press Enter. Is the output what you expected? At first glance, it may look like this would not list any files that start with photo or video, or in with .jpg or .png, but we see files in our output that start with video and photo, so what's going on? Let's analyze this extended glob. Our first pattern matches the word photo or the word video and specifies that exactly one has to be…
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
-
-
-
-
-