Operating System - HP-UX
1755854
Members
3126
Online
108838
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО12-09-2003 06:43 PM
тАО12-09-2003 06:43 PM
chown -R
Hello
I use netapps, when I choose to change permissions using chown -R considers .snapshot directories which are part of the current filesystems for obvious reasons. How do I ignore .snapshot directories in this case.
Currently Iam using chown -R username:dba `echo *`.
Just looking if any better ways are in there.
Thank you,
Madhu
I use netapps, when I choose to change permissions using chown -R considers .snapshot directories which are part of the current filesystems for obvious reasons. How do I ignore .snapshot directories in this case.
Currently Iam using chown -R username:dba `echo *`.
Just looking if any better ways are in there.
Thank you,
Madhu
Think Positive
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2003 07:00 PM
тАО12-09-2003 07:00 PM
Re: chown -R
It depends on the location where you start the chown and the location of the mount of the netapp directory...
If you are at the place where the mount has taken place the 'chown -R username:dba *' (using the echo can only break things when there are spaces in filenames. leaving the echo out works just as fine) works, because filenames beginning with a dot are ignored.
If you are on a different level, it becomes harder. I think the best way would be using a find, filter out the .snapshot paths, and then do a chown on the single files. This can be done like this:
find . | grep -v '[.]snapshot' | while read file
do
chown username:dba $file
done
This will take a long time, though, because the chown is called not once but many times. I think it can be done more efficiently in perl. But this solution is simple and will work.
If you are at the place where the mount has taken place the 'chown -R username:dba *' (using the echo can only break things when there are spaces in filenames. leaving the echo out works just as fine) works, because filenames beginning with a dot are ignored.
If you are on a different level, it becomes harder. I think the best way would be using a find, filter out the .snapshot paths, and then do a chown on the single files. This can be done like this:
find . | grep -v '[.]snapshot' | while read file
do
chown username:dba $file
done
This will take a long time, though, because the chown is called not once but many times. I think it can be done more efficiently in perl. But this solution is simple and will work.
Every problem has at least one solution. Only some solutions are harder to find.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2003 07:12 PM
тАО12-09-2003 07:12 PM
Re: chown -R
Hi,
in one line
find . ! -path './.snapshot*' -xargs -exec chown {} \;
Gideon
in one line
find . ! -path './.snapshot*' -xargs -exec chown {} \;
Gideon
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP