Exclude symlink

(imported topic written by atxrobbie)

I’m trying to check descendants of “/var/adm” for other=write. I’ve come across a symlink to an NFS share that i need to exclude. here is the relevance i’m using but doesn’t seem to be working. It’s not excluding the symlink (which contains “lib” in the pathname). this relevance is processing the symlink folder and is taking hours to process.

(exists folder “/var/adm” whose (other write of it = true)) OR (exists descendants whose ((exists symlink it equals false) AND ((pathname of it does not contain “atria” and pathname of it does not contain “rational” and pathname of it does not contain “lib”) AND (other write of it = true))) of folder “/var/adm”)

any assistance would be greatly appreciated.

thanks,

Robbie

(imported comment written by SystemAdmin)

“descendants” is slow, so if there is any way out of it, its good to write relevance that doesn’t use it.

That being said, it looks like “symlink” is only working when given a string.

If you do:

Q: symlink “/tmp/nameofmysymlink”

A: /tmp/nameofmysymlink

but if you do:

Q: symlink of folder “/tmp/nameofmysymlink”

E: Singluar expression refers to nonexistent object

So it looks like its a bug which is now filed

The following does work if you can incorporate it somehow?

Q: symlink (“nameofmysymlink”) of folder “/tmp”

A: /tmp/nameofmysymlink

(imported comment written by SystemAdmin)

Turns out it does work but probably not as expected

The relevance you have that says

exists symlink it equals false

If you change this to

exists symlink (it) = false

You should get the response you need.

(imported comment written by atxrobbie)

is there something else to use besides ‘descendants’? if so, i’m all for it.

unfortunately, neither of the suggestions have helped. the relevance is still churning on the symlink/directry that i need to exclude. its like the relevance has to continue to evaluate every path recursively before it will return.

(imported comment written by SystemAdmin)

When you try the item you know is a symlink with qna what do you get as an example?

(exists (symlink it) = false ) of folder "put in your symlink here"

(imported comment written by atxrobbie)

it returns false

(imported comment written by SystemAdmin)

So what type of symlink is this? Is this a hard link? Or is it really a mount point?

This is getting close to perhaps you needing to contact support about this if you want to continue. An ls -al of the link might show what this is

(imported comment written by atxrobbie)

this is a softlink.

(imported comment written by SystemAdmin)

So if (exists (symlink it) = false ) of folder “put in your symlink here” returned false, that should drop out of your loop.

Have you tried it with exactly that syntax?

(imported comment written by atxrobbie)

my mistake. it returns TRUE.

Q: (exists (symlink it) = false ) of folder “folder symlink resides in”

A: True