- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Find command to find part of a filename
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
02-20-2005 10:59 PM
02-20-2005 10:59 PM
The filename will will consist of the user id (eg. lst24) and other numbers (eg. 050217) - making the filename = lst24050217.
Question : How do I use the 'find' command to search the sub-directories to look for the file based on the user id info - I'm interested in all files created by this user.
All help rewarded ! Many Thanks.
Simon
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 11:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 11:03 PM
02-20-2005 11:03 PM
Re: Find command to find part of a filename
cd to the directory you want to start looing under and type:
find . -name lst24
Note the spaces on each side of the dot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 11:07 PM
02-20-2005 11:07 PM
Re: Find command to find part of a filename
find . -name 'lst24*'
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 11:10 PM
02-20-2005 11:10 PM
Re: Find command to find part of a filename
I forgot the *
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 11:10 PM
02-20-2005 11:10 PM
Re: Find command to find part of a filename
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 11:12 PM
02-20-2005 11:12 PM
Re: Find command to find part of a filename
find searches also in subdirectories, so
find /dir -name "lst24*"
Instead of /dir you can change in that directory and search with '.'
'-name' searches for the file name '-user' would do it for the user name.
'*' is the wildcard - you can set it anywhere, but you have to use the "" then.
If you wanna see more of the files, you can add the '-exec ll {} \;' like RJ said.
HTH
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2005 12:03 AM
02-21-2005 12:03 AM