- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Running the "find" command, but want to exclud...
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
Forums
Discussions
Discussions
Discussions
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
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
09-26-2006 04:44 AM
09-26-2006 04:44 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2006 04:55 AM
09-26-2006 04:55 AM
SolutionSyntax:
find / \( -name local -a -type d -prune \) -o \( -print \)
I would more likely just pipe the output of find through grep and -v the directories I didn't want to see.
find / -print | grep -v ^/usr/local
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2006 05:09 AM
09-26-2006 05:09 AM
Re: Running the "find" command, but want to exclude certain dirs
find / ! \( -path '/usr/local/*' -o -path '/etc/lp/*' \)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2006 05:09 AM
09-26-2006 05:09 AM
Re: Running the "find" command, but want to exclude certain dirs
# find / -type f ! -path "/usr/local/*"
...should meet your needs. This will look for ALL FILES on ALL mountpoints, but skip the '/usr/local/*' directory.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2006 05:12 AM
09-26-2006 05:12 AM
Re: Running the "find" command, but want to exclude certain dirs
check this find discussion.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=975461
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2006 06:53 AM
09-26-2006 06:53 AM
Re: Running the "find" command, but want to exclude certain dirs
# find / \( -path "/usr/local" -o -path "/sbin" -o -path "/etc" \) -prune -o -type f -print
cheers!