- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- find help
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
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
03-07-2002 10:57 AM
03-07-2002 10:57 AM
I know its very easy to get but when i run the following command its take forever... what I want is to find all the files having this line CN=/usr/local/ias_prod451 so I can change to new path, i am running
find . -exec grep -l 'CN=/usr/local/ias_prod451' {} \;
Any suggestion what i'm doing wrong
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2002 11:03 AM
03-07-2002 11:03 AM
Re: find help
find . -type f -exec grep -l 'CN=/usr/local/ias_prod451' {} \;
if you have nfs files systems you want to skip (which may be what is taking so long), add this:
find . -type f ! -fsonly NFS -exec grep -l 'CN=/usr/local/ias_prod451' {} \;
HTH
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2002 11:06 AM
03-07-2002 11:06 AM
Re: find help
What's your PWD when you run this. Limit the start to ONLY where you have iPlanet App Server installed.
Also if your vxfs FS usage is high in the FS(s) being searched & you have OnLineJFS, a defrag can zip the search along a little.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2002 11:12 AM
03-07-2002 11:12 AM
SolutionThis thread has some interesting ideas concerning searching for a string in text files:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xd19e3fa720f3d5118ff40090279cd0f9,00.html
The command which worked best for me was:
find / -type f -exec grep -l 'CN=/usr/local/ias_prod451' {} \; | xargs file | grep text | awk -F: '{print $1}'
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2002 12:45 AM
03-08-2002 12:45 AM
Re: find help
I always try and avoid -exec, as it generates one process for each file. With xargs, it will process as many files as it can fit in one command, so something like the following may help:
find / -type f | xargs file | grep text | cut -d: -f 1 | xargs grep -l 'CN=/usr/local/ias_prod451'
Rgds, Robin