While working with vals, you are going to use wildcards a lot.
So how about these wildcards?
Well, most VAL oriented commands support a couple of wildcards as in
lsastar where the star is for any character, no matter how many.
So lsastar will show all valves that have a name starting with an A.
Now we also have the question mark. And the question mark is for one single character no
matter which one. So LSA will show you vals that have a name that starts with an
A followed by at least one more character and followed by zero or more characters.
Next there is LSA square bracket NM square bracket is selector. So either n or m
followed by the wealth card between square brackets. You can also use a range of characters.
Many commands also support working with groups and ranges like Touchfell curly
braces 1100 which will create VAL1 up to VAL100 or MKDIR data
curly braces account which will create data cells and also data account.
Let me show you.
So for more result I'm going to do this from the etc directory and I'm starting with an lsa.
And what do we see? Well, we see a couple of files.
Then we see directories with the matching name.
And for the directory with the matching name it shows all of the contents.
We also see an occasional Permission denied. Let's ignore that for now. That's because of the fact that I'm not using my root superpowers.
Now I want to fix this problem about the directories and their directory contents. How are we going to do that?
Well, by making that LS D A because D is
just showing the directory name and not the directory contents.
Now let me show you LS da.
What are we looking for? Well, we are looking for any item that follows a pattern starting
with an a followed by at least one character followed by a dot followed by other characters.
You can see that's giving a match on at deny.
Notice that a star would also have done that. But then you can
also see files that have a name with a dot somewhere later.
Then what is LS A?
Let's make that SU doing. Well, that's showing second character either an S or
a U. And if we make that S U, then we can see the
second character starting with an S up to a U and anything in between.
And this is what the result is looking like.
Now another one that I would like to show you is these ranges.
So touch foul curly brace 1.10 and then I'm using my LS and
look at that. It has created Vals 1.10 let me remove that.
Remove vals.
Of course, I can specify the range here as well, but hey, I just want to
remove anything that has a name starting with vals. So the wildcard will work as well.
And that's how you can use wildcards as well as ranges while working with vals.