- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- find a string
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
03-04-2003 12:53 AM
03-04-2003 12:53 AM
find a string
Actually what happened is that a post exec script failed because of a wrong directory specified on an unknown script.
i know what is that directory
Need help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2003 12:57 AM
03-04-2003 12:57 AM
Re: find a string
Find . -type f|xargs grep -il string
Will give the name of all files where the
string ocurs relative to the current directory.
steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2003 01:18 AM
03-04-2003 01:18 AM
Re: find a string
#find
This command let you search into a specific
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2003 02:23 AM
03-04-2003 02:23 AM
Re: find a string
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2003 03:20 AM
03-04-2003 03:20 AM
Re: find a string
kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2003 04:37 AM
03-04-2003 04:37 AM
Re: find a string
find
regards,
ali.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2003 04:43 AM
03-04-2003 04:43 AM
Re: find a string
Exactly what do you type and what do you get.
Regards,
Trond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2003 04:50 AM
03-04-2003 04:50 AM
Re: find a string
This will work:
# find /dir -type f -print|xargs grep yourstring
...the use of 'xargs' is also less resource-intensive than 'exec'. Notice the addition of the '-print' option to 'find' to output the filenames.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2003 04:51 AM
03-04-2003 04:51 AM
Re: find a string
you need to include curly braces in the command string: The file names, in which the grep command will search, will be put in there, e.g.:
find
else grep will just hang.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2003 04:59 AM
03-04-2003 04:59 AM
Re: find a string
This command works fine! Let try be too explicit. Supose that you need search the "loopback" string into your "/etc" directory, the sintax must be:
#find /etc -type f -exec grep -l 'loopback' {} \;
In my case the string "loopbak" was found in:
/etc/hosts
/etc/services
/etc/rc.config.d/netconf
/etc/hpC2400/arraymon.dest
/etc/opt/resmon/log/client.log
/etc/netconfig
/etc/ppp/Dialers.ex
/etc/networks
/etc/sam/reg_tm.db
/etc/#hosts
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2003 10:54 AM
03-04-2003 10:54 AM
Re: find a string
# find / -type f | xargs grep "CPU"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2003 11:17 AM
03-04-2003 11:17 AM
Re: find a string
find . -print | xargs grep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2003 09:34 PM
03-04-2003 09:34 PM
Re: find a string
find /etc -type f -exec grep -l 'loopback' {} \;
the above both work really fine
thanks everybody.
ali.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2003 06:06 AM
03-05-2003 06:06 AM
Re: find a string
Regards,
Trond