- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: find command causes dump?
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
Discussions
Discussions
Forums
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
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
тАО05-19-2008 06:09 AM
тАО05-19-2008 06:09 AM
find command causes dump?
>find . -name '*.log' |xargs grep ERR
This works fine. But when i look for files containing 'err', this happens:
>find . -name '*.log' |xargs grep err
find: cannot open ./.Thatfile
THE APPLICATION PROGRAM DUMP DUMP SUCCESSFULLY CREATED!
THE APPLICATION PROGRAM DUMP DUMP SUCCESSFULLY CREATED!
and so on
Apparently, the last command should have been
>find . -name '*.log' |xargs grep 'err'
instead
Any idea what happened here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2008 02:23 AM
тАО05-20-2008 02:23 AM
Re: find command causes dump?
If you can't figure out how to use xargs, give up and pass xargs a simple script:
$ find . -name '*.log' | xargs grep_err
Then create a script called grep_err:
#!/usr/bin/ksh
grep err $@
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2008 03:59 AM
тАО05-20-2008 03:59 AM
Re: find command causes dump?
May be your OS version is bit old or not patched well.
You can also try
find . -name '*log' -exec grep err {} \;
or
find . -name '*list*' -exec grep err {} +
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2008 06:32 AM
тАО05-20-2008 06:32 AM
Re: find command causes dump?
first check, if 'grep' really results in what all expect:
type grep
This should be /usr/bin/grep .
Two more thoughts:
1) Feed only plain files to grep - your find command lists even dirs, FIFOs, ...
find . -type f -name '*.log' |xargs grep err
2) grep won't tell the filename, when only one argument is supplied. This may happen, when there is only one file found or just one left for the last call of xargs. I suggest to provide /dev/null for this:
find . -type f -name '*.log' |xargs grep err
/dev/null
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2010 06:46 AM
тАО04-14-2010 06:46 AM
Re: find command causes dump?
By the way, the OS is old (ver 10.20)