- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to traverse sub. dirs?
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
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
тАО08-15-2002 08:42 AM
тАО08-15-2002 08:42 AM
Solved! Go to Solution.
- Tags:
- find
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2002 08:56 AM
тАО08-15-2002 08:56 AM
Re: How to traverse sub. dirs?
Are there certain sub-dirs you want to go into and others you don't?
Can you not just specify 'find /u5/data/tomx -name filename'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2002 09:00 AM
тАО08-15-2002 09:00 AM
Re: How to traverse sub. dirs?
The problem is not limited to one file but 2.5 million files spread out across 49 sub dir.s under /u5/data. Each file requires that a command be run against it, i.e, find /u5/data/megax/* -xdev -exec chmod 777 {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2002 09:01 AM
тАО08-15-2002 09:01 AM
Re: How to traverse sub. dirs?
may be this will:
# find /u5/data/megax -xdev -print
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2002 09:03 AM
тАО08-15-2002 09:03 AM
Re: How to traverse sub. dirs?
Why not something like:
# cd /u5/data
# chmod -R 777 megax
If you need the megax directory itself to be some other permissions then you could do:
# chmod 555 megax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2002 09:07 AM
тАО08-15-2002 09:07 AM
Re: How to traverse sub. dirs?
And again, chmod -R is a recursive command that will cross over into other sub directories.
The solution to this problem is not to cross over into another sub dir from a starting point of: /u5/data/megax, for example.
I.e, find /u5/data -(something here) -exech net perms {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2002 09:07 AM
тАО08-15-2002 09:07 AM
Re: How to traverse sub. dirs?
try this:
# find /u5/data/tomx -xdev -exec chmod 777 {} \;
You can also try chmod -R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2002 09:11 AM
тАО08-15-2002 09:11 AM
Re: How to traverse sub. dirs?
suggestion wouldn't work.
If you are trying to exclude certain directories from
the find command, you can use the ! operator:
find /u5/data \! -path '/u5/data/megax*' -exec ...
You can use the () and -a operators if you have
multiple directories you want to exclude.
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2002 09:18 AM
тАО08-15-2002 09:18 AM
Re: How to traverse sub. dirs?
find /u5/data/!, etc. omits one of the 49 sub dir.s only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2002 09:22 AM
тАО08-15-2002 09:22 AM
Re: How to traverse sub. dirs?
start your find from /u5/data/tomx and not /u5/data. this will search only that directory.