Reputation: 27375
I need to find all files which have the following path:
/usr/local/.../site-admin/data.sh
I mean I wanta find all such data.sh
which are located in site-admin
. Note, that /usr/local
may contain multiple site-admin
directoires. How can I do that?
Upvotes: 1
Views: 86
Reputation: 201
You will also want to grep so you are sure the file is in a directory site-admin:
find /usr/local -name data.sh | grep site-admin/data.sh$
Upvotes: 1
Reputation: 784918
You can use find
:
find /usr/local -name 'data.sh'
If you want data.sh
to be in /site-admin/
only
find /usr/local -path '*/site-admin/data.sh'
Upvotes: 2