HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: search script???
Operating System - HP-UX
1834137
Members
2221
Online
110064
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
Go to solution
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
05-29-2003 01:01 AM
05-29-2003 01:01 AM
hello !
i want to find the file.
but i can't remember file name. only i know file contents.
so, i want to make shell script searching file contents that i find in all files
do you happen to know?
please~ help~
i want to find the file.
but i can't remember file name. only i know file contents.
so, i want to make shell script searching file contents that i find in all files
do you happen to know?
please~ help~
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 01:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 01:09 AM
05-29-2003 01:09 AM
Re: search script???
Hi,
There are better ways, but a quick and dirty approach could be:
find / -type f -exec grep -l yoursearchstring {} \;
or
find / -type f | xargs grep -l yoursearchstring
regards,
Darren.
There are better ways, but a quick and dirty approach could be:
find / -type f -exec grep -l yoursearchstring {} \;
or
find / -type f | xargs grep -l yoursearchstring
regards,
Darren.
Calm down. It's only ones and zeros...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 01:13 AM
05-29-2003 01:13 AM
Re: search script???
Let's assume that you know a word "searchfile" and you want to find out the file name which has that word in it. Use
find / -type f -exec grep -l searchfile {} \;
If you want to list the search word from all file, the exclude the -l (ell) option
ie,
find / -type f -exec searchfile {} \;
find / -type f -exec grep -l searchfile {} \;
If you want to list the search word from all file, the exclude the -l (ell) option
ie,
find / -type f -exec searchfile {} \;
RAJUSHANKAR
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