How list every file into each folder that starts with a certain character...

Hello.

when I'm using Linux and I want to list every file located in every directory which starts with a certain character,I would issue a command like this :

Code:
find /compat/ubuntu -name _*

but it does not work like this in FreeBSD. Can someone tell me what's the correct command to issue on FreeBSD to achieve the same result ?

maybe this ? :

find / -type d -name 'x_*'

it seems that it does not always work :

Screenshot_2023-01-03_14-27-42.jpg

thanks.
 
It's just in the first example of the manual page

find / -name "X_*" -print
This will print all files and directories which start with X_
If you want to print only the directories then use "-type d" or if you want only files then "-type f"
find / -type f -name "X_*" -print
 
Back
Top