- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: counting sub-directories
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-09-2004 04:23 AM
02-09-2004 04:23 AM
Anyway, searching here I found that PHKL_28185 has removed vx_maxlink as a configurable parameter and set it to 65534. That should be enough, but I need to see how many directory links there are. I tried this but I am not sure I am getting the right number.
ls -R | grep "./" | wc -l
I am counting the number of times ./ appears which seems to be the start of a subdirectory.
Is there a better way?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2004 04:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2004 04:27 AM
02-09-2004 04:27 AM
Re: counting sub-directories
Its not very processor intensive.
numsub=$(ls -R grep "./" |wc -l)
export numsub
Now I know the number of subbies.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2004 04:37 AM
02-09-2004 04:37 AM
Re: counting sub-directories
> find . -type d | wc -l
31496
> ls -R | grep "./" | wc -l
31756
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2004 04:38 AM
02-09-2004 04:38 AM
Re: counting sub-directories
sh-2.05b$ time perl -lMFile::Find -e'END{print$n}find(sub{-d&&$n++},".")'
19
real 0m0.109s
user 0m0.110s
sys 0m0.000s
sh-2.05b$ time find . -type d | wc -l
19
real 0m0.018s
user 0m0.010s
sys 0m0.010s
sh-2.05b$ time ls -R | grep "./" | wc -l
18
real 0m0.042s
user 0m0.020s
sys 0m0.020s
sh-2.05b$
timex
Enjoy, Have FUN! H.Merijn