- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- What is the difference between ' find . -name h* '...
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
тАО04-21-2002 09:48 PM
тАО04-21-2002 09:48 PM
The result are different when I type in the command line as follows:
# find . -name h*
find: missing conjunction
# find . -name ho*
./hosts
./net/ticlts/hosts
./net/ticots/hosts
./net/ticotsord/hosts
Could anybody give me an explaination about the difference and why?
Thanks a lot!
Best Regards.,
May
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2002 10:05 PM
тАО04-21-2002 10:05 PM
Re: What is the difference between ' find . -name h* ' and ' find . -name ho* '?
find . -name "h*"
should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2002 10:10 PM
тАО04-21-2002 10:10 PM
Solutionset -x
find . -name h*
set +x
You'll probably find that the shell expanded the h* to one or more matching files in the current directory, hence this error.
If you had one or more files starting with "ho" in the current directory, 'find . -name ho*' would also have given the same error.
Another solution to your problem would be:
set -f
find . -name h*
set +f
'set -f' instructs the shell to turn off file globbing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2002 10:21 PM
тАО04-21-2002 10:21 PM
Re: What is the difference between ' find . -name h* ' and ' find . -name ho* '?
In my /tmp catalog, this meant find . -name h* was expanded to find . -name hei hei.txt heidu help.sh hh home.chk hpufl1
This makes no sense to the program find. If you quote ("h*") the argument is unexpanded and correctly interprated by find.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2002 10:32 PM
тАО04-21-2002 10:32 PM
Re: What is the difference between ' find . -name h* ' and ' find . -name ho* '?
find . -name h\*
find . -name ho\*
The expression will them be expanded "as find finds files". As opposed to hatched with files in current dir before starting the find.
Regards,
Trond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2002 08:30 AM
тАО04-22-2002 08:30 AM
Re: What is the difference between ' find . -name h* ' and ' find . -name ho* '?
find . -name "h*"
and
find . -name "ho*"