- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- find command problem
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
09-20-2007 03:36 PM
09-20-2007 03:36 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2007 04:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2007 04:56 PM
09-20-2007 04:56 PM
Re: find command problem
/tmp
inventory1
inventory11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2007 04:57 PM
09-20-2007 04:57 PM
Re: find command problem
/var
xxx1.txt
xxx11.txt
xxx2.txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2007 05:20 PM
09-20-2007 05:20 PM
Re: find command problem
If you want to search only in specific directory you can use ls or ll command instead of find.
#ll /var/*.txt
or goto that directory then search.
#cd /var
#ll *.txt
Hope this helps
Thanks
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2007 02:31 PM
09-24-2007 02:31 PM
Re: find command problem
# cd /var
# du -s * > /tmp/var.txt
# more /tmp/var.txt
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2007 07:04 PM
09-24-2007 07:04 PM
Re: find command problem
You can follow these steps:
1) cd /var
2) ls -al | grep "filename"
Best regards.
Ernesto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2007 08:18 PM
09-24-2007 08:18 PM
Re: find command problem
One of the commands that everyone should master is the find command.
The first, and most obvious, use is find's ability to locate old, big, or unused files, or files that you forgot where they are.
The other important characteristic is find's ability to travel down subdirectories. If you wanted a recursive directory list, and ls doesn't have this option, use find.
BR.
Ernesto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2007 01:04 AM
09-25-2007 01:04 AM
Re: find command problem
Cd /var
find . -name fimename
sp,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2007 01:18 AM
09-25-2007 01:18 AM
Re: find command problem
if you only want to find files 'xxx.txt' in a defined directory, then use the 'ls' command (or ll) and 'grep'.
ls /var|grep xxx.txt
No need to use find.
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2007 04:34 AM
09-25-2007 04:34 AM
Re: find command problem
an addition to Volker's solution: Keep in mind, that grep- and find/shell arguments use a different syntax when specifying pattern:
To get get all names starting with 'a' and ending in '.txt' use for
... find / shell:
find . -name 'a*.txt' ...
ls -d a*.txt
... grep:
ls /your/dir | grep '^a.*[.]txt$' or
ls /your/dir | grep '^a.*\.txt$'
mfG Peter