Tuesday, 7 July 2020

How to exclude a directory in find . command

find -name "*.js" -not -path "./directory/*"

No comments:

Post a Comment

How to check if a file contains a specific string using Bash

 In case if you want to check whether file does not contain a specific string, you can do it as follows. if ! grep -q SomeString "$File...