Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

is there a way to use *.{txt,zip,tbz,dmg} if one or more might be missing?



This seems like one of those things that I might have not learned that
everyone else knows, so I thought I'd ask.

I can use this:

        mv -vn *.{txt,zip,tbz,dmg} ~/dir/

to move all files that end with zip/txt/tbz/dmg to ~/dir/

BUT it will fail if it does not find at least one file with each of
those extensions.

Is there a way to do basically the same thing, but tell `mv` "if is at
least one file with any of these extensions, then move to ~/dir/" ?

I suppose I could use `find` with various `-o` flags, but I was
wondering if there was an easier way.

Thanks!

Tj

--
TJ Luoma
TJ @ MacStories
Personal Website: luo.ma (aka RhymesWithDiploma.com)
Twitter: @tjluoma



Messages sorted by: Reverse Date, Date, Thread, Author