- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: find is searching only current working folder ...
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-12-2009 11:13 AM
тАО08-12-2009 11:13 AM
When using the below command, it is finding for files and folder with in current working directory only but not sub directories (recursively).
#find . -xdev -mtime +250 -exec rm -rf {} \;
At the same time if we use with out "-xdev" it is finding with in sub directories also.
How to solve this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2009 11:26 AM
тАО08-12-2009 11:26 AM
Re: find is searching only current working folder but not sub directories when using the option "-xdev"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2009 11:41 AM
тАО08-12-2009 11:41 AM
SolutionThe '-xdev' switch of find() tells 'find' not to cross (descend into) mountpoints other than the one from which it began.
The is very useful if you want to search '/' but do _not_ want to visit the mountpoints like '/usr', '/var', '/opt', etc. In that case, though, directories like '/etc' and 'sbin' _would be_ examined because they are _not_ mountpoints, just directories subordinate to the root '/'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2009 11:42 AM
тАО08-12-2009 11:42 AM
Re: find is searching only current working folder but not sub directories when using the option "-xdev"
Non-psychics may have some trouble guessing
what's wrong, as we have no information on
"current working folder", or the file systems
on this system.
pwd
mount
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2009 11:43 AM
тАО08-12-2009 11:43 AM
Re: find is searching only current working folder but not sub directories when using the option "-xdev"
By the way, you have a number of questions that you have asked during the last few days that remain unevaluated. Please don't forget to visit your profile, and review and evaluate them. Thanks.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2009 11:44 AM
тАО08-12-2009 11:44 AM
Re: find is searching only current working folder but not sub directories when using the option "-xdev"
> ago?
Do you mean a question with nowhere near
enough information in it? There's one every
few minutes, or so it seems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2009 12:03 PM
тАО08-12-2009 12:03 PM
Re: find is searching only current working folder but not sub directories when using the option "-xdev"
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1360840