- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Creation of directory with special name on HP-UX
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
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
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
тАО07-27-2009 01:59 PM
тАО07-27-2009 01:59 PM
I was trying to create subdirectores rose/pink under /some/directory using command as below:
mkdir -p /some/directory/rose/pink as a powerbroker user.
The directory /some/directory has alread been used by some running Applications.
It failed to create the rose/pink. Then i went to /some/directory and issued the command mkdir -p rose/pink.
It worked this time. However, i saw a directory with special name -p got created under /some/directory.
Can anyone explain how come this directory with special name got created ?
Thanks,
Shiv
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 02:14 PM
тАО07-27-2009 02:14 PM
Solution> It failed to create the rose/pink.
I would expect that unless you either specified '-p' with rose/pink or did a 'mkdir rose'; 'cd rose && mkdir pink'.
> Then i went to /some/directory and issued the command mkdir -p rose/pink.
OK, that's the easy way.
> It worked this time. However, i saw a directory with special name -p got created under /some/directory. Can anyone explain how come this directory with special name got created ?
I strongly suspect that you first inverted the arguments so that you had:
# mkdir -p rose/pink -p
(or something like that)
You could look at your 'sh_history' if it still exists.
To remove the errant directory name, do:
# rm -- -p
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 02:15 PM
тАО07-27-2009 02:15 PM
Re: Creation of directory with special name on HP-UX
OOPS!
To remove the errant directory name, do:
# rmdir -- -p
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 02:27 PM
тАО07-27-2009 02:27 PM
Re: Creation of directory with special name on HP-UX
$mkdir -p /some/directory/rose/pink
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 03:11 PM
тАО07-27-2009 03:11 PM
Re: Creation of directory with special name on HP-UX
I agree with JRF in that you may have mistakenly done something like 'mkdir /some/directory/rose/pink -p' rather than 'mkdir -p'.
Check your powerbroker logs to see what it recorded exactly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 03:56 PM
тАО07-27-2009 03:56 PM
Re: Creation of directory with special name on HP-UX
Secondly, i tried to create a directory with the name -p under my home directory but i could not probably because -p is a directory with special character.
Is there any specific command if i need to use to create directory having special character say -p in this case ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 04:08 PM
тАО07-27-2009 04:08 PM
Re: Creation of directory with special name on HP-UX
> I usually never type commands if it is a part of some install guide and i need to execute in production. I just copy and paste on terminal. That way i avoid typo mistake.
Unless you paste more than once :-)
> Secondly, i tried to create a directory with the name -p under my home directory but i could not probably because -p is a directory with special character. Is there any specific command if i need to use to create directory having special character say -p in this case ?
But of course! Do:
# mkdir -- -p
The double dash tells well-behaved utilities that there are no more switches and that the remainder of the argument list are arguments.
Thus, having created the directory named '-p' with the above, remove it with:
# rmdir -- -p
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2009 01:59 AM
тАО07-28-2009 01:59 AM
Re: Creation of directory with special name on HP-UX
You can also use the tried and true:
mkdir ./-p
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2009 03:57 AM
тАО07-28-2009 03:57 AM
Re: Creation of directory with special name on HP-UX
Is there a mistake to be found in the history output or the .sh_history or whatever file you have HISTFILE pointed at.
I can add that I've gotten the same results once or twice was ready to call the response center and/or post results to ITRC and the keyboard history contradicted what I thought I'd done.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com