fd
fd copied to clipboard
Cannot use the -p flag to filter out directories through regex
What version of fd
are you using?
fd --version
fd 8.4.0
When I use the -p
flag to search a directory
by regular matching, the .*/$
expression does not take effect. But the directories in the return result end in /
(e.g.: dir/
), which confused me.
The "/" at the end is not actually part of the path. It is added on to the output as a way of indicating that the entry is a directory.
You can, however, use --type directory
(or -td
in short) to only match on directories.
I'm going to close this, because I don't think there is anything that needs to be done here.