- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: remove directory
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-17-2008 04:25 AM
тАО07-17-2008 04:25 AM
remove directory
-----------------
ls -s /
drwxr-xr-x 2 root sys 96 Jul 17 09:14 U03
-----------------
error message:
# rm -r /U03
rm: /U03 non-existent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2008 04:29 AM
тАО07-17-2008 04:29 AM
Re: remove directory
Check the logs.
Either its really not there or you are not giving the correct path.
rm -rf /U03
If you created a logical volume using lvcreate then it will have a path set in the volume group configuration directory.
Lets say I created lvol1 in vg01
The entry for this logical volume is in /dev/vg01 lvol1 and rlvol2
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
тАО07-17-2008 04:35 AM
тАО07-17-2008 04:35 AM
Re: remove directory
If the directory isn't truly non-existent, then its name probably contains unprintable characters. You can do:
# ls -bl /U03
...to see the unprintable characters as octal values
You could do (carefully):
# rm -r /U03*
Regards!
...JRF...
- Tags:
- unprintable chars
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2008 05:36 AM
тАО07-17-2008 05:36 AM
Re: remove directory
---------
#ls -lb /
drwxr-xr-x 2 root sys 96 Jul 17 09:14 U\033[2~03
-----------
so what is the command to remove it/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2008 05:44 AM
тАО07-17-2008 05:44 AM
Re: remove directory
ls -l /U*033*
if this returns only your messed up dir
then
rmdir /U*033*
or
find / -name "U*033*" -exec ls -ld {} \;
if this returns only the messed up dir
then
find / -name "U*033*" -exec rmdir {} \;
(I purposefully did not use rm -r)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2008 05:45 AM
тАО07-17-2008 05:45 AM
Re: remove directory
You could do:
# rm -r /U\033[2~03
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2008 05:52 AM
тАО07-17-2008 05:52 AM
Re: remove directory
try the rmdir -i option
# rmdir -i U*
and answer yes to one above U\033[2~03
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2008 06:33 AM
тАО07-17-2008 06:33 AM
Re: remove directory
so doing this command can delete all U* directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2008 07:31 AM
тАО07-17-2008 07:31 AM
Re: remove directory
> i have another directory U01 and U02.
so doing this command can delete all U* directory
Yes, if you do:
# rm /U*
...you are asking the shell to expand "U" into every file and/or directory that begins with that letter and then run the remove command on those objects.
I *URGE* you to add the interactive ('-i') option to commands like this *or* to first examine what is going to happpen by doing:
# echo /U*
# rm -i /U*
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2008 07:50 AM
тАО07-17-2008 07:50 AM
Re: remove directory
I'm sorry, my last answer was wrong for the way your question was worded.
You need to use 'rmdir' to remove a directory. Further, that only removes an *empty* directory. You *can* use 'rm' to remove a directory and all its contents, however, if you add the '-r' flag to descend into the directory (r)ecursively.
Hence, if you do:
# rm -r /U*
...you would remove *all* directories and files that begin with the letter "U". You would be much better advised to first check what's going to happen by first doing:
# echo /U*
and/or adding the '-i' flag:
# rm -r -i /U*
...unless you are very sure of what you are asking.
Regards!
...JRF...