- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to delete 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
Forums
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
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
тАО12-30-2002 04:40 PM
тАО12-30-2002 04:40 PM
how to delete directory
Now, is there a faster way to do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2002 04:48 PM
тАО12-30-2002 04:48 PM
Re: how to delete directory
Try "rm a* c* d*"
and keep doing it.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2002 04:53 PM
тАО12-30-2002 04:53 PM
Re: how to delete directory
Sridhar's way could work too, but it will also take a while, especially if you have to go thru a*, b*, etc. for all letters of the alphabet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2002 05:00 PM
тАО12-30-2002 05:00 PM
Re: how to delete directory
# rm -fr thedir
...will recursively delete the directory's contents and the directory itself. If it takes a long time, that's a reflection of the number of files and subdirectories being processed.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2002 05:02 PM
тАО12-30-2002 05:02 PM
Re: how to delete directory
# find . -type f -name "*" -print | xargs rm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2002 05:03 PM
тАО12-30-2002 05:03 PM
Re: how to delete directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2002 05:15 PM
тАО12-30-2002 05:15 PM
Re: how to delete directory
Using the find command in conjunction with the 'xargs' command should fix the problem with the 'arg list' being too long
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2002 05:15 PM
тАО12-30-2002 05:15 PM
Re: how to delete directory
Look at man pages of "rmdir" and "rm" commands.
I think that good way to get delete the director.
# rmdir -f directory
or
# rm -rf directory
Happy new year!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2002 05:48 PM
тАО12-30-2002 05:48 PM
Re: how to delete directory
Thus the command:
# rm -rf dirname
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2002 07:21 PM
тАО12-30-2002 07:21 PM
Re: how to delete directory
As far as the speed, there is nothing faster since every file removed must be properly handled in the directory structures. Now if the directory is actually a mountpoint, then you can always un-mount the directory and use newfs to create an empty directory in just a couple of seconds.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2002 09:30 PM
тАО12-30-2002 09:30 PM
Re: how to delete directory
Hi,
rm -rf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-31-2002 01:46 AM
тАО12-31-2002 01:46 AM
Re: how to delete directory
sh
get into the directory
run
for i in $i; do ls ; rm -rf $i; echo $i; done
regards
chakri