Perfect! Your environment is identical to mine (as far as zsh an macOS versions go). The command in the example should work for you as well, unless I misunderstood the question. ❯ uname -a Darwin FOLSML-R5TYG8W 16.3.0 Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016; root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64 ~ ❯ zsh --version zsh 5.3.1 (x86_64-apple-darwin16.3.0) -- Gabor On Sun, Dec 25, 2016 at 12:49 PM Hoji, Akihiko wrote: > I forgot to mention this. I am using zsh 5.3.1 > (x86_64-apple-darwin16.3.0) and OS X 10.12.2 > > > AH > > > > On Dec 25, 2016, at 3:45 PM, Gabor Maghera wrote: > > > > Not sure if it's some nuance with different versions of zsh we're > running, > > but I needed to "setopt exended_glob" (with the underscore). But I think > > the main issue here is the globbing syntax. > > > > Have a look at a working example here: https://asciinema.org/a/97273 > > > > Merry Christmas, > > Gabor > > > > > > > > On Sun, Dec 25, 2016 at 11:22 AM Hoji, Akihiko wrote: > > > >> Hi, > >> > >> > >> I am trying to delete all the files except a few files having the same > >> file extension. I did the following; > >> > >> setopt extended glob > >> rm -rf —^file.ext.* > >> > >> This gives an error message, “zsh, no matches found:” > >> > >> I would appreciate a poster as to what I am doing wrong. > >> > >> Thanks in advance. > >> > >> AH > >