- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How do I recursively chown on a file.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2000 08:56 AM
тАО10-30-2000 08:56 AM
How do I recursively chown on a file.
trying to run a command that will find
all of the files owned by the old UID
and chown them to the new UID. Here
is the command I have been using:
find /proj/hdl -user 221 -exec chown jcox +
Where /proj/hdl is the top-level directory,
221 is the old UID,
and jcox is the new login name.
However, it does not appear to be working.
Is there a better way to implement this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2000 08:59 AM
тАО10-30-2000 08:59 AM
Re: How do I recursively chown on a file.
find /proj/hdl -user 221 -exec chown jcox + {} ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2000 09:03 AM
тАО10-30-2000 09:03 AM
Re: How do I recursively chown on a file.
# find /proj/hdl -user 221 -exec chown {} jcox \;
BTW: A convenient option of 'chown' is the recursive option (-R). You can change the ownership of whole the contents of a directory like this:
# chown -R jcox /proj/hdl
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2000 09:09 AM
тАО10-30-2000 09:09 AM
Re: How do I recursively chown on a file.
process is in a SLEEP state. And when I
examine the files it does not appear to be
doing anything.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2000 09:57 AM
тАО10-30-2000 09:57 AM
Re: How do I recursively chown on a file.
FYI: When running a top, almost all processes should be in a sleep state, because when top reports to the screen, it is running, not the process you are monitoring.
Good Luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2000 12:07 PM
тАО10-30-2000 12:07 PM
Re: How do I recursively chown on a file.
Corrected syntax and more info:
# find /proj/hdl -user 221 -exec chown jcox {} \;
BTW: A convenient option of 'chown' is the recursive option (-R). You can change the ownership of the contents of a directory like this:
# chown -R jcox /proj/hdl
You may note also, that 'exec' (in the first example, above) can be fairly slow. This is because a process is spawned for each file or directory. A faster, less resource-intensive way is:
# find /proj/hdl -user 221|xargs chown jcox
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2000 04:21 AM
тАО10-31-2000 04:21 AM
Re: How do I recursively chown on a file.
find . -print | xargs chown username
see if it helps.
Leigh Ann