Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: global find and replace for file ownership



On Mon, 27 Jan 2003, Vicente Lozano wrote:

> Could anyone recommend a good command line method (or point me to a
> previous discussion topic) for globally finding and replacing file
> ownership ?
>
> One of our administrators has recently moved on, and I would like to
> revert ownership of the project files he worked on to the admin user
> before deleting the user account.
>

This command will list the files owned by that user
find / -uid $uidOfUser -print

The trick is finding a way to progmatically change their ownership, which
is a pain as everything needs to be escaped due to spaces and high-bite
characters in filenames. That and the find and xargs on OSX suck comapred
the GNU versions on most linux systems (I want -fprintf, damint! :)

-n
--
----------------------------------------
nathan hruby <email@hidden>
computer services specialist
uga drama
http://www.drama.uga.edu/support/
----------------------------------------
_______________________________________________
macos-x-server mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macos-x-server
Do not post admin requests to the list. They will be ignored.

References: 
 >global find and replace for file ownership (From: Vicente Lozano <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.