- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- command to delete all the 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
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
тАО11-11-2008 02:03 PM
тАО11-11-2008 02:03 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2008 02:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2008 02:17 PM
тАО11-11-2008 02:17 PM
Re: command to delete all the directories
By the way, if '/path' is a mountpoint, and you want to empty the entire filesystem, it is faster to unmount '/path' and 'newfs' the filesystem than to delete (recursively) all files and directories therein:
# umount /path
# newfs -F vxfs -o largefiles /dev/vgNN/rlvolX
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2008 02:47 PM
тАО11-11-2008 02:47 PM
Re: command to delete all the directories
# find /path -type d -maxdepth 1 -exec rm -Rf {} \;
Make a test to see if it correct so you don't delete the wrong things.
# find /path -type d -maxdepth 1 -exec ls -ald {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2008 06:45 PM
тАО11-11-2008 06:45 PM
Re: command to delete all the directories
Thanks,
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2008 08:22 PM
тАО11-11-2008 08:22 PM
Re: command to delete all the directories
rm -Rf is the right command to delete entire directory and its subdirectories.
rm -rf and rm -Rf both are same
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2008 08:25 PM
тАО11-11-2008 08:25 PM
Re: command to delete all the directories
> rm -rf and rm -Rf both are same
If they're the same, what makes one of them
"the right command"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2008 01:05 AM
тАО11-12-2008 01:05 AM
Re: command to delete all the directories
I came to knwo for man rm only please see the below output of man page
-R For each argument that is a directory, this option causes rm
to recursively delete the entire contents of that directory
before removing the directory itself. When used in
conjunction with the -i option, rm asks whether to examine
each directory before interactively removing files in that
directory and again afterward to confirm removing the
directory itself.
The -R option will descend to arbitrary depths in a file
hierarchy and will not fail due to path length limitations
unless the length of file name, file specified by the user
exceeds system limitations.
-r Equivalent to -R.
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2008 05:44 AM
тАО11-12-2008 05:44 AM