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.

有帮助吗?

解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top