Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need a command to change the ownership of a files (scattered across a node) to another user

146 views
Skip to first unread message

Bikku

unread,
Jan 3, 2011, 7:57:26 AM1/3/11
to
Hi All,

I am looking forward for a single command which will collect the files
of perticular user (in this case, my files only) in a system and
change the owenership to another user.

I knew following commands to do this. Hoever, as the filese scattered
across on different volumes in node, it will consume time.

fup info $*.*.*,user x.y
fup give <file>,a.b

Is there any way/command to change the all files ownership in a single
run?

Thanks,
Bikku

Warren M

unread,
Jan 3, 2011, 9:46:24 AM1/3/11
to
On Jan 3, 7:57 am, Bikku <bikku...@gmail.com> wrote:
> Is there any way/command to change the all files ownership in a single
> run?
>

In a word, no.

By specifying $*.*.*, FUP has to read the entire directory on every
volume (there is no key on userid). If your file names follow a
subvol naming convention such as BIK*.*, then FUP could read only that
subset of directory entries on each volume which would be significatly
faster.

Keith Dick

unread,
Jan 3, 2011, 4:00:16 PM1/3/11
to

I have never tried this, but the FUP manual says that GIVE can take a qualified fileset list as the argument to specify the file, so a command something like this:

FUP GIVE ($*.*.* WHERE OWNER = x.y),a.b

ought to do what you ask. This will not change the ownership of files that are open exclusively, SQL tables, or Safeguard-protected files, and I imagine encountering such will stop the command with an error unless you use the ALLOW command before GIVE to permit continuing despite errors (and it no longer would be a one-line command if you do that).

Do read all of the Considerations for the GIVE command in the FUP manual to see some side-effects of using GIVE.

I cannot remember whether $*.*.* is correct for FUP or *.*.* is correct, and the description of filesets does not seem to say which is accepted. Perhaps both are accepted.

The description of filesets claims that a wild card can be used for a volume name only in the commands VOLS, SUBVOLS, INFO, FILENAMES, and FILEs. If that is true, then you would not be able to use one GIVE command as above, but would have to use one for each disc. I don't know why there would be a restriction that permits a wild card in the volume name for some commands but not for others, but there might be some good reason that I am not thinking of. So you should do some experiments to see whether that limitation actually does apply to the GIVE command. Perhaps GIVE was accidently left off the list of commands where the wild card in volume name is allowed.

Bikku

unread,
Jan 5, 2011, 4:45:03 AM1/5/11
to
> The description of filesets claims that a wild card can be used for a volume name only in the commands VOLS, SUBVOLS, INFO, FILENAMES, and FILEs.  If that is true, then you would not be able to use one GIVE command as above, but would have to use one for each disc.  I don't know why there would be a restriction that permits a wild card in the volume name for some commands but not for others, but there might be some good reason that I am not thinking of.  So you should do some experiments to see whether that limitation actually does apply to the GIVE command.  Perhaps GIVE was accidently left off the list of commands where the wild card in volume name is allowed.- Hide quoted text -
>
> - Show quoted text -

Thanks for the inputs.
True, wild card is not considered for volume in the FUP GIVE command.

wbreidbach

unread,
Jan 5, 2011, 4:51:26 AM1/5/11
to
> The description of filesets claims that a wild card can be used for a volume name only in the commands VOLS, SUBVOLS, INFO, FILENAMES, and FILEs.  If that is true, then you would not be able to use one GIVE command as above, but would have to use one for each disc.  I don't know why there would be a restriction that permits a wild card in the volume name for some commands but not for others, but there might be some good reason that I am not thinking of.  So you should do some experiments to see whether that limitation actually does apply to the GIVE command.  Perhaps GIVE was accidently left off the list of commands where the wild card in volume name is allowed.- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

FUP does not support *.*.*, it only supports $*.*.*.

0 new messages