A directory contains .zip
and .rar
files, and files of other type.
To list only .rar
and .zip
files, there is ls *.zip *.rar
In bash, how to match both types with one regex?
Do you really want a regular expression?
This uses *
("globbing") and {[...]}
("brace expansion").
$ ls *.{zip,rar}
See also this question for many, many more shortcuts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With