ShellWildcards
Revision as of 17:15, 22 September 2009 by Michael Murtaugh (talk | contribs)
~ | path of users home directory (aka $HOME) | |
? | Any single character | |
* | Any string of characters | |
[aeiou] | Any vowel | |
[!aeiou] | Any character that's not a, e, i, o, or u | |
{jpg,gif} | either "jpg" or "gif" |
example:
ls images/Project[4-6].txt
matches:
- images/Project4.txt
- images/Project5.txt
- images/Project6.txt
but not:
- images/Project3.txt
and
mv foo/*.{jpg,gif} images
is handy for moving all the image files from one directory (foo) to another (images).