Suppose I have the directories:
/foo/
/A/B/C/foo/D/E/
/F/foo/G/H/foo/I/
How can get a result that lists all the directories whose basename exactly matches
a given string (for example foo
in here)?
/foo/
/A/B/C/foo/
/F/foo/
/F/foo/G/H/foo/
command linedirectoryfind
Suppose I have the directories:
/foo/
/A/B/C/foo/D/E/
/F/foo/G/H/foo/I/
How can get a result that lists all the directories whose basename exactly matches
a given string (for example foo
in here)?
/foo/
/A/B/C/foo/
/F/foo/
/F/foo/G/H/foo/
Best Answer
You can use
find
: