reza
reza

Reputation: 6358

Unix command not working

I need to recurse a directory and delete all the files with js and map extensions.

what i currently have that does not work is

find . -name *.js -or -name *.map | xargs rm

Anything obvious wrong with this command?

Upvotes: 0

Views: 759

Answers (1)

William Pursell
William Pursell

Reputation: 212198

The shell is probably expanding the arguments to find. Quote them:

find . \( -name '*.js' -or -name '*.map' \) -delete

Upvotes: 3

Related Questions