- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- System Administration
- >
- directories
-
- Forums
-
Blogs
- Alliances
- Around the Storage Block
- Behind the scenes @ Labs
- HPE Careers
- HPE Storage Tech Insiders
- Infrastructure Insights
- Inspiring Progress
- Internet of Things (IoT)
- My Learning Certification
- OEM Solutions
- Servers: The Right Compute
- Shifting to Software-Defined
- Telecom IQ
- Transforming IT
- Infrastructure Solutions German
- L’Avenir de l’IT
- IT e Trasformazione Digitale
- Enterprise Topics
- ИТ для нового стиля бизнеса
- Blogs
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Enterprise.nxt
- Marketplace
- Aruba Airheads Community
-
Forums
-
Blogs
-
InformationEnglish
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-04-2010 09:34 PM
07-04-2010 09:34 PM
i want to create multiple directories in one particular directories(apporximately around 150 folders).
Regds
Rajesh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-04-2010 10:08 PM
07-04-2010 10:08 PM
Solutionmkdir -p can be useful. Please have a look at mkdir man page:
http://docs.hp.com/en/B2355-90689/mkdir.1.html
Hope this helps.
Regards,
Bhadresh
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-04-2010 10:15 PM
07-04-2010 10:15 PM
Re: directories
for example :
mkdir /test/{1,2,3,4,5,6,7,8,9,10}{1,2,3,4,5,6,7,8,9,10}
mikap
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-05-2010 05:10 AM
07-05-2010 05:10 AM
Re: directories
mikap,
A fine suggestion.
Thank you for reminding us of that.
You may have been too enthusiastic though.
Most probably do NOT want those 10's in there, but just zeroes.
For example: mkdir /test/{0..9}{0..9}
myself, I prefer a full prinf function to construct names as I like them.
For example using perl:
# perl -e 'for (1..150) { $x = sprintf "test_%03d", $_; mkdir $x }'
cheers,
Hein
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-05-2010 08:23 AM
07-05-2010 08:23 AM
Re: directories
I'm not aware of this syntax working in a real shell?
You would have to use a while with typeset for leading zeros. Or create a file with your unique pattern of directory names.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-05-2010 08:53 AM
07-05-2010 08:53 AM
Re: directories
Here it is:
- To create:
# perl -e 'while ($i++<150){system "mkdir test$i"}'
- To check:
# find . -type d -name "test*" | wc -l
150
Enjoy, Have fun!,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-05-2010 09:04 AM
07-05-2010 09:04 AM
Re: directories
Hmm,
Why would use 'system' to launch a command, when a direct call is available, as I showed in my earlier alternative solution?
Using the 'system' step will be less efficient and has reduced error handling.
fwiw,
Hein
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2019 Hewlett Packard Enterprise Development LP