I want to find all/any directories on a UNIX Server named "2"
, but I only want them within a certain directory structure name "/home/abc/public_html"
.
I tried this:
find / -type d -name "/home/abc/public_html/*2"
But I got the error
find: warning: Unix filenames usually don't contain slashes (though pathnames do).
Add a condition with
-a
:Or, as seen in comments:
Because you were getting the error