HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: "find" command -- Please "find" that for me !
Operating System - HP-UX
1834785
Members
2571
Online
110070
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
Forums
Discussions
Discussions
Discussions
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
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
09-06-2001 12:00 AM
09-06-2001 12:00 AM
"find" command -- Please "find" that for me !
I am running following command to prepare a list, but the problem is that "find" is also taking the directory "bin" that I don't want. Can anybody point out the error in the script.
find ./ \( ! \( -name 'core' -o -name '*.bk' -o -name '*.c' -o -name '*.err' -o -name '*
.exec' -o -name '*.out' -o -name '*.bak' -o -name '*.dbg' -o -name '*.LOG' -o -name '*.log' -o -n
ame '*.old' \) \) -print \( -type d \( -name Mail -o -name bin -o -name dat -o -
name log -o -name settlerep -o -name tmp \) \) -prune > ./file.lst
Thanks and regards
Amit Kureel
find ./ \( ! \( -name 'core' -o -name '*.bk' -o -name '*.c' -o -name '*.err' -o -name '*
.exec' -o -name '*.out' -o -name '*.bak' -o -name '*.dbg' -o -name '*.LOG' -o -name '*.log' -o -n
ame '*.old' \) \) -print \( -type d \( -name Mail -o -name bin -o -name dat -o -
name log -o -name settlerep -o -name tmp \) \) -prune > ./file.lst
Thanks and regards
Amit Kureel
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2001 12:40 AM
09-06-2001 12:40 AM
Re: "find" command -- Please "find" that for me !
what is current directory from which the search begins?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2001 12:56 AM
09-06-2001 12:56 AM
Re: "find" command -- Please "find" that for me !
Hello,
I assume u want to exclude /usr/bin which is a link in root directory. then use
find ./ | grep -v "./usr/bin"|to ur script.
If u want to avoid bin in current directory then find ./ |grep -v "./bin" | ur script.
U can use even multiple grep -v options if u want.
Hope this may help u.
Regards
Joe.
I assume u want to exclude /usr/bin which is a link in root directory. then use
find ./ | grep -v "./usr/bin"|to ur script.
If u want to avoid bin in current directory then find ./ |grep -v "./bin" | ur script.
U can use even multiple grep -v options if u want.
Hope this may help u.
Regards
Joe.
Knowledge is wealth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2001 04:58 AM
09-06-2001 04:58 AM
Re: "find" command -- Please "find" that for me !
I believe if you take out the
-o -name bin
you should be ok
...jcd...
-o -name bin
you should be ok
...jcd...
If I had only read the instructions first??
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.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP