Search code examples
findsolarissolaris-10

Find not working as expected in Solaris 10


find / ! -path "/home" -name "*thing*"

Gives:

find: bad option -path
find: [-H | -L] path-list predicate-list

It seems like some options in find in Solaris 10 don't behave like they do on Linux. For example, to negate something, I need to do "!" instead of "-not". Essentially my problem is I'm trying to find something but exclude a directory because of how long it would take to traverse it. However, I can't do this if I can't specify a path to exclude.

It's strange how -name works but -path doesn't. I'm quite happy to use an alternative to find if it gets the job done ofc.


Solution

  • When man fails you ask Google.....

    "solaris find exclude path" yields

    https://unix.stackexchange.com/questions/23077/how-to-exclude-a-list-of-full-directory-paths-in-find-command-on-solaris