I want to use find
for getting all simlinks and regular files. I can use the -type for these individually, and I can use -o to string them together, but I apparently can't do -type fl
.
Is there a way condense this command? It's pretty burdensome.
find -type l -name node-dev -exec ls -lah {} + -o -type f -name node-dev -exec ls -lah {} +
I would like to be able to run it without the -o
, like:
find -type lf -name node-dev -exec ls -lah {} +
The man page seems to indicate this isn't possible (it doesn't say anything about extra -type
flag arguments), but I thought I'd ask anyways and try to learn something.
Note the files have no guarantee of any kind of reasonable extension naming structure, so any regex based solutions probably won't work. Also, I could use the '!'
operator to exclude directories like this answer suggests, but I'd ideally like to exclude more than just directories from the search.