- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: about find
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
06-13-2002 10:11 PM
06-13-2002 10:11 PM
about find
when i use the command "find" ,1, as "root", i type "find / -name abc* -print" and return the correct information,but when i goto a directory such as "/home/abc" and type "find . -name abc* -print ",the system give me a message "find: missing conjunction".
2,i su to username "abc",and type "find . -name abc* -print",it also tell me "find : missing conjunction".
and if i type the command as "find . -name 'abc*' -print", either root or user abc can recieve the correct information.
why??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2002 10:20 PM
06-13-2002 10:20 PM
Re: about find
Hi,
Check if you get the same error-message
if you use the whole path for the
find command:
/usr/bin/find ......
Regards
Olav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2002 10:27 PM
06-13-2002 10:27 PM
Re: about find
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2002 10:27 PM
06-13-2002 10:27 PM
Re: about find
abc* is expanded by the shell interpreter (your running shell) to the list of matching filenames in the existing directory.
Because -name only accepts only a single parameter, when abc* expands to multiple matching filenames, find returns a missing conjunction error because there are more than one parameter to -name.
The single quotes prevents abc* from being interpreted by the shell interpreter (your running shell).
find works in / without the single quotes because there are no matches for abc* in /.
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2002 10:31 PM
06-13-2002 10:31 PM
Re: about find
Alternatively to using single quotes, you can use the following to disable file-globbing (i.e. not interpreting * in the shell):
# set -f
# cd /home/abc
# find . -name abc* -print
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2002 10:33 PM
06-13-2002 10:33 PM
Re: about find
Hi,
Try this:
find . -name abc\* -print
Olav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2002 10:38 PM
06-13-2002 10:38 PM
Re: about find
It is better to use \ or single quote or double quote.
When you give it is abc* the shell misinterprets as multiply or something.
If you use quotes the shell iinterprets as one or more characters following abc.
you can use
find ./ -name abc\*
find ./ -name 'abc*'
find ./ -name "abc*"
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2002 12:37 AM
06-14-2002 12:37 AM
Re: about find
echo abc*
You must find any file beginnig whit -.
The correct use for * in find is quoted.
find . -name "abc*" .....