Moving everything, except $ pwd ~/test/t $ ls a.t aa.t b.t c.t $ mv ./!(a*) .. # if you are using zsh, use ^ $ ls a.t aa.t