- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- HPUX 10.20 / 11.00 Search
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp
Knowledge Base
Discussions
Forums
Discussions
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
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
04-15-2003 01:05 AM
04-15-2003 01:05 AM
e.g. I need to see which files contain the word 'test'
Please help :-)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 01:11 AM
04-15-2003 01:11 AM
Re: HPUX 10.20 / 11.00 Search
This works for me;
find . -type f -print -exec grep -i "
Send the output to a file and when done edit it and search for your string as this lists every single file as it searches it and only if it finds your string do you want to lookup the preceeding line which is the name of the file containing it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 01:15 AM
04-15-2003 01:15 AM
Re: HPUX 10.20 / 11.00 Search
find . -type f | xargs grep test
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 01:33 AM
04-15-2003 01:33 AM
Re: HPUX 10.20 / 11.00 Search
Many thanks for the help! Can I just clarify the comment by Stefan - I do only want to see the files and paths that contain the string and not each file it searches.... should I stil use same criteria then??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 01:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 01:49 AM
04-15-2003 01:49 AM
Re: HPUX 10.20 / 11.00 Search
find / -type f | grep -l test {} \;
The grep option -l only lists the filename if the file contains the requested text.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 01:50 AM
04-15-2003 01:50 AM
Re: HPUX 10.20 / 11.00 Search
This what I normaly use myself:
find . -name '*' -exec grep -l 'Your test word' {} \;
Also there is a program called findgrep, it is using perl and it very handy. you can downlaoed the depot and install on your system, it is good program to have.
http://hpux.connect.org.uk/hppd/hpux/Misc/findgrep-1.0
cheers
Mehdi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 01:52 AM
04-15-2003 01:52 AM
Re: HPUX 10.20 / 11.00 Search
find / -type f -exec grep -l test {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 01:59 AM
04-15-2003 01:59 AM
Re: HPUX 10.20 / 11.00 Search
find . -type f -exec grep -li "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 02:45 AM
04-15-2003 02:45 AM
Re: HPUX 10.20 / 11.00 Search
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 03:03 AM
04-15-2003 03:03 AM
Re: HPUX 10.20 / 11.00 Search
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x8d9619434a69d711abdc0090277a778c,00.html
I know I am late, but a similar query was asked just yesterday - link above.
- ramd.