Tuesday, February 9, 2016

Search with find command and use regex

To find a file/s in a specific location and use regular expressions, use find command with -regextype sed option and specify regex with -regex:

find . -regextype sed -regex ".*[s|S]uper[e|E]nhancer.*"


This will find all files that contatin in their name:
superenhancer
Superenhancer
superEnhancer
SuperEnhancer

No comments:

Post a Comment