Find a directory by name
May 16, 2020
code
find -type d -name cache
findis the simplest command you can use to find files and folders-typeflag means search only of this type,dis for directories-nameflag means search for this name,cacheis what i searched for
You can take it a step further by using -exec to run some action on the directories you found. For example, i can use the command below to find all directories named cache and set their permissions to 777
code
find . -type d -name cache -exec chmod 777 {} \;