Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

If I want to open all mp4 files in a directory, I can simply do something like totem *.mp4. But how can I open all mp4 and all flv files in that directory with one command. I.e. I want to do something like this totem (*.mp4 OR *.flv). What's the easiest way to do this? Perhaps it helps that I am using zsh.

share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

Simply call

totem *.mp4 *.flv

Too easy, isn't it ;-)

share|improve this answer
    
Thanks, indeed, too easy :-) –  student Sep 5 '12 at 14:32
add comment

Or in a single pattern (with extended_glob):

totem *.(mp4|flv)
share|improve this answer
add comment

Or slightly more compact:

totem *.{mp4,flv}
share|improve this answer
1  
+1 This works on bash as well. –  user2354329 May 17 '13 at 5:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.