Hey everyone! I'm wondering if there's a way to highlight directories in the output of the `find` command, similar to how `ls -F` gives a visual cue for directories. For example, when I run `find ./ -name 'something'`, I'd love to differentiate between files and directories. Any tips on how to achieve that? Thanks in advance!
1 Answer
You can actually use the `find` command to call `ls` with the `-d` flag, which prevents it from diving into directories. Here's a quick example: `find ./ -name 'something' -exec ls -dFla {} +`. This should do the trick! Just a note, you might not need the `-a` flag, though.

Thanks a lot! I think I'll go with: `find ./ -name 'something' -exec ls -dF {} +` or `find ./ -name 'something' -exec ls -F {} +`. The last one seems cool because it shows directories ending with a colon! Check out this view I found: https://imgbox.com/53rgCwvK.