Sunday, September 14, 2008

UNIX Command - FIND

There will be a time when you need to execute a command (or commands) for each file that matches a specific criteria.  UNIX has a good tool to accomplish this task by default.

Assume that you want to grant execute permission for group in every *.cgi file in the current directory (recursively).  You use this command:

$ find . -name *.cgi -exec chmod g+x '{}' \;


Post a Comment