- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Strange behavior in "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
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
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-02-2008 04:49 AM
07-02-2008 04:49 AM
I got some little problem with the „find“ command.
Look at this action:
arw0726:/cadnc/iarchiv> find . -name 1609706_4571*
./1609706_4571p0114v0005.ideas
arw0726:/cadnc/iarchiv> cd 2008
arw0726:/cadnc/iarchiv/2008> ll 1609706_4571*
-rw-rw-r-- 1 arluzo cadnc 6080 7. Jan., 10:35 1609706_4571p0000v0002.ideas
-rw-rw-r-- 1 arluzo cadnc 6080 7. Jan., 10:42 1609706_4571p0000v0003.ideas
arw0726:/cadnc/iarchiv/2008> find . -name 1609706_4571*
find: Fehlende Verbindung
arw0726:/cadnc/iarchiv/2008>
arw0726:/cadnc/iarchiv/2008> find . -name 1609706_4571* -print
find: Fehlende Verbindung
arw0726:/cadnc/iarchiv/2008>
Why is „find“ only finding 1 file and not both?
The error should called “lost connection” in English.
If anyone need further information I will post them.
Hope someone can help.
Thx
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2008 04:56 AM
07-02-2008 04:56 AM
SolutionIf you didn't quote the argument to '-name' you have a problem. The shell will see the "*" and do file name expansion.
You need to do:
# find . -name "1609706_4571*"
If you only want files (and not directories too) returned, do:
# find . -type f -name "1609706_4571*"
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2008 05:21 AM
07-02-2008 05:21 AM
Re: Strange behavior in "find"
You have to use the quote as SEP said.
man find (-name)
-name file True if pattern file matches the last component of the current file name. Pattern is matched according to Pattern Matching Notation for file name expansion. Pattern should be escaped (using backslash) or quoted when find is invoked from the shell, to prevent the shell from expanding any metacharacters. Pattern may contain supplementary code set characters.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2008 05:49 AM
07-02-2008 05:49 AM
Re: Strange behavior in "find"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2008 05:52 AM
07-02-2008 05:52 AM