- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- find question
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
07-31-2003 06:55 AM
07-31-2003 06:55 AM
when I'm running find as a normal user in csh I get the error message:
find: cannot open xxxx
find / -name filename -print 2>/dev/null returns me the error:
missing conjunction
any idea?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 06:57 AM
07-31-2003 06:57 AM
Re: find question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 06:58 AM
07-31-2003 06:58 AM
Re: find question
Interesting - I just tried it with ksh and got no errors.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 07:00 AM
07-31-2003 07:00 AM
Re: find question
Actually, I just switched to csh and got no errors, either. Strange!
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 07:00 AM
07-31-2003 07:00 AM
Re: find question
Put:
find / -name "filename" -print
or
find / -name 'filename' -print
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 07:03 AM
07-31-2003 07:03 AM
Re: find question
It sounds as though you are including wildcard characters (? or *) in filename.
When you do that you either have to quote the whole string, something like:
find . -name "wild*card"
or 'quote' the wildcard character:
find . -name wild\*card
Regar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 07:03 AM
07-31-2003 07:03 AM
Re: find question
It sounds as though you are including wildcard characters (? or *) in filename.
When you do that you either have to quote the whole string, something like:
find . -name "wild*card"
or 'quote' the wildcard character:
find . -name wild\*card
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 07:03 AM
07-31-2003 07:03 AM
Re: find question
# find ..options ...-name 'filename' -print
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 07:08 AM
07-31-2003 07:08 AM
Re: find question
1 - You MUST be using ksh or sh otherwise the 2>/dev/null will fail. If you are using csh or tcsh then 2>/dev/null will not help (no such thing as std err in C-shell)
2 - No need for the -print, but it will not hurt
3 - put a backslash before wild cards
Regards
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 07:09 AM
07-31-2003 07:09 AM
Re: find question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 07:12 AM
07-31-2003 07:12 AM
Re: find question
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 07:20 AM
07-31-2003 07:20 AM
Re: find question
How about a work-around then:
find / -name filename -print |grep -v 'cannot'
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 07:21 AM
07-31-2003 07:21 AM
Re: find question
Disregard, that doen't work.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 07:53 AM
07-31-2003 07:53 AM
Re: find question
as already said, C-shell does not have any redirection control of standard error. Hence C-shell does not understand the "2>"??; it believes this to be an option to the "find" command.
I think it will correspond this in sh:
# find . -name plut -print 2
which will produce a similar error message.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 08:04 AM
07-31-2003 08:04 AM
Solutionrun your find command in a subshell like this:
(find / -name filename >`tty`) >&/dev/null
HTH,
Michael.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 08:10 AM
07-31-2003 08:10 AM
Re: find question
case closed