Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to convert all powerpoint type files to pdf using the find -exec and unoconv command.

find . -name '*.@(ppt|PPT|pptx|PPTX|pps|PPS|ppsm|PPSM|ppsx|PPSX|pptm|PPTM)' -exec unoconv -v -f pdf '{}' \;

I have done this before, but since I included the extended pattern matching it does not work. I have tried various options but nothing works. I would appreciate if someone can tell me what I am doing wrong. It just doesn't run.

share|improve this question

find doesn't support extended pattern matching. Assuming you have a find with -iname support (like GNU find), I'd use something like:

find . \( -iname '*.ppt*' -o -iname '*.pps*' \) -exec unoconv -v -f pdf '{}' \;

If you're really worried about that matching files incorrectly, you can use more -o clauses with more restrictive patterns.

share|improve this answer
… or even -iname '*.pp[st]*'. – Scott May 2 '13 at 23:25
thanks, that worked for me. – Jacques MALAPRADE May 2 '13 at 23:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .