- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- find command
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-29-2003 03:54 PM
07-29-2003 03:54 PM
Could anybody please tell me how do i get this.
I only need the directory which contains a.sql file . But it keeps showing me all the directory with this annoying
find: cannot open xxxx messages
when i do
find / -name a.sql -print
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2003 04:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2003 04:03 PM
07-29-2003 04:03 PM
Re: find command
You get these messages if you are running the find command as a non root user. Its basically telling you that it cannot read directories as it doesn't have permission, therefore if your file resides in these directories, it won't find it.
To fix the "problem" run the command as root.
One bit of advice, running "find / ..." can have an impact on system performance. If you have some idea where the file is, narrow the search as in:
# find /oracle /application -name "a.sql" -print
For example this searches /oracle & /application directories & all sub directories for a.sql file.
Cheers
Con
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2003 04:03 PM
07-29-2003 04:03 PM
Re: find command
Even better, if you want to return just the directory containing the file a.sql, try:
find / -name a.sql -exec dirname {} \; 2>/dev/null
Cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 07:37 AM
07-31-2003 07:37 AM
Re: find command
find / -name a.sql -exec ls -ld {} \;
It works for me when I try to find master.d in /usr/conf with:
find /usr/conf -name master.d -exec ls -ld {} \;
Regards,
-erich (Eric Herberholz)