- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Reg find command for depp directory structure
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
05-16-2012 10:16 PM
05-16-2012 10:16 PM
Hi ,
Am looking for a find command with arguments that would help me to search fast through a deep dierctory structure .
Am using hpux 11iv2.
Solved! Go to Solution.
- Tags:
- find
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2012 10:26 PM
05-16-2012 10:26 PM
Re: Reg find command for deep directory structure
What are you searching for? A filename or property?
find path -name "*foo*"
Of contents of files?
find path -exec fgrep bar {} +
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2012 10:58 PM
05-16-2012 10:58 PM
Re: Reg find command for deep directory structure
Am trying to search a particular directory from /a/b/c/d/e/f/g/h/001/20090131
/a/b/c/d/e/f/g/h/002/20090229
like this to 600 ( i.e form 001 - 600 )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2012 11:05 PM
05-16-2012 11:05 PM
Re: Reg find command for deep directory structure
>Am trying to search a particular directory from /a/b/c/d/e/f/g/h/001/20090131
>/a/b/c/d/e/f/g/h/002/20090229 like this to 600 (i.e. from 001 - 600)
Again, are you search for filenames or file contents?
If in /a/b/c/d/e/f/g/h/, you have lots more than all files with ???, you can try [0-6][0-9[0-9].
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2012 11:54 PM
05-16-2012 11:54 PM
Re: Reg find command for deep directory structure
Hi Dennis ,
Let me make it clear ,
We have the folllowing direcrory structure ,
/ftp/gb/B2/kv/cations/001 t0 650 clients
Now i need to find ONLY all month end directories with its contents i.e
/ftp/gb/B2/kv/cations/001/reports/20090131
.
.
.
.
.
/ftp/gb/B2/kv/cations/650/reports/20091231
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2012 02:09 PM
05-17-2012 02:09 PM
Re: Reg find command for deep directory structure
>I need to find ONLY all month end directories with its contents
/ftp/gb/B2/kv/cations/001/reports/20090131
/ftp/gb/B2/kv/cations/650/reports/20091231
Then you can just use nested Composite patterns:
ls /ftp/gb/B2/kv/cations/*/reports/?(??????31|?????(04|06|09|11)30|????0228)
(In leap years you would have a problem with 0229.)
Or you can toss this pattern stuff and use awk to find the last entry for each month.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2012 01:27 AM
05-29-2012 01:27 AM
Re: Reg find command for deep directory structure
Hi Dennis ,
When i ran the ls comand , my all branches after locations / * got merged into one common folder for ex: the directories that got created are 20090131,20090229,20090331 etc.
I want it tobe like 001/reports/20090131
002/reports/20090229
till 650/reports/20091130
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2012 06:33 AM