Operating System - OpenVMS
1752565 Members
5803 Online
108788 Solutions
New Discussion юеВ

dir/by_owner of files NOT by a particular user?

 
Thomas A. Williams
Regular Advisor

dir/by_owner of files NOT by a particular user?

I know how to do a DIR/BY_OWNER=uic to find out files owned by a particular user. It it possible to find all files owned by anyone BUT that user? I know I could write a script to do a "dir/owner" to a file, then throw away everything owned by that owner, but it would be nice if DCL had that capability. I know the ACCOUNTING utility lets you select records like that, by preceding the UIC with a minus sign. Maybe it's in V8.3? 8.4?
6 REPLIES 6
Hoff
Honored Contributor

Re: dir/by_owner of files NOT by a particular user?

Nope. (You could get yourself a username over at Encompasserve (DECUServe) and have a look at V8.3 yourself. As for V8.4, that's not been announced yet.)

As for options, you could...

PIPE DIRECT /WIDTH=... ddcu:[...]this.that /NOHEAD /NOTRAIL /COLUM=1 | SEARCH SYS$PIPE target /MATCH=NOT, or such.

Set the width appropriately to allow the pipe to pass the filename and the ownership all on the same line. (If it wraps onto the next line, this won't work.)

or use the classic solution here. A DCL command procedure with f$search in a loop, and using f$file to pull the ownership (items GRP and MEM, or such) for testing with an IF statement. This is the traditional scheme, and there are examples of this loop around.

http://h71000.www7.hp.com/wizard/wiz_4986.html

Or you could use find and grep, but you probably don't have those tools installed.

Stephen Hoffman
HoffmanLabs LLC
Thomas A. Williams
Regular Advisor

Re: dir/by_owner of files NOT by a particular user?

Thanks for the response. I already wrote a "quickie" dcl procedure to do it, but it'd be nice as a future feature. I stumbled across a directory a directory that has files owned by a differrent user, and wanted to generate a listing.
Hoff
Honored Contributor

Re: dir/by_owner of files NOT by a particular user?

OpenVMS lacks integrated regular expression capabilities (regex), which means you get something that looks like SEARCH and its home-grown syntax, or you roll your own.

Or you fetch something -- like grep -- that does have regex capabilities, and use that.

It feels rather weird referring to SEARCH syntax as arcane and comparatively primitive, but -- once you're used to using something built with regex capabilities -- it does seem that way.

DCL and the various lexical functions are the usual solution, as you've found.

Current versions of the Freeware DFU package might also help here, see the SEARCH /NOOWNER mechanism.

I do not know that anyone here passes any suggestions posted here along to OpenVMS Engineering, in any event.
Jan van den Ende
Honored Contributor

Re: dir/by_owner of files NOT by a particular user?

Re Hoff:

>>>
I do not know that anyone here passes any suggestions posted here along to OpenVMS Engineering, in any event.
<<

Well, not currently.
Guy ( "mr DCL" ) was a moderator as well, and that worked great.

But, as per his suggestion, an email tp

DCL@HP.COM

and that would do the trick as well.

Maybe, add a pointer to this thread, and any "AYES"'s could be added here.

Count me as one!

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Jan van den Ende
Honored Contributor

Re: dir/by_owner of files NOT by a particular user?

Thomas, BTW,

from your Forum Profile:


I have assigned points to 46 of 132 responses to my questions.


Some date back to 2005.

Maybe you can find some time to do some assigning?

http://forums1.itrc.hp.com/service/forums/helptips.do?#33

Mind, I do NOT say you necessarily need to give lots of points. It is fully up to _YOU_ to decide how many. If you consider an answer is not deserving any points, you can also assign 0 ( = zero ) points, and then that answer will no longer be counted as unassigned.
Consider, that every poster took at least the trouble of posting for you!

To easily find your streams with unassigned points, click your own name somewhere.
This will bring up your profile.
Near the bottom of that page, under the caption "My Question(s)" you will find "questions or topics with unassigned points " Clicking that will give all, and only, your questions that still have unassigned postings.
If you have closed some of those streams, you must "Reopen" them to "Submit points". (After which you can "Close" again)

Do not forget to explicitly activate "Submit points", or your effort gets lost again!!

Thanks on behalf of your Forum colleagues.

PS. - nothing personal in this. I try to post it to everyone with this kind of assignment ratio in this forum. If you have received a posting like this before - please do not take offence - none is intended!

PPS. - Zero points for this.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Ian Miller.
Honored Contributor

Re: dir/by_owner of files NOT by a particular user?

What are you trying to achieve ?

If you are trying to ensure that the files in a directory are owned by the same user as the directory then you may be interested in this

http://vms.process.com/scripts/fileserv/fileserv_search.exe?package=claim

____________________
Purely Personal Opinion