- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- How to remove files and directories recursively
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
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
тАО02-23-2004 02:26 AM
тАО02-23-2004 02:26 AM
I need to remove a user's home directory that contains fifty or so sub directories with a thousand or so files. What is the easiest way to do that ???
Vern
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 02:29 AM
тАО02-23-2004 02:29 AM
Re: How to remove files and directories recursively
For example, if the user's home is "/home/mary" do
cd /home
rm -r mary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 02:30 AM
тАО02-23-2004 02:30 AM
Re: How to remove files and directories recursively
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 02:40 AM
тАО02-23-2004 02:40 AM
Re: How to remove files and directories recursively
[root@linda /home]# rm -r vern
rm: descend into directory `vern'? y
rm: remove `vern/.bash_logout'? y
rm: remove `vern/.bash_profile'?
Surely there is a better way than to enter y return over a thousand times ??
Vern
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 02:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 02:47 AM
тАО02-23-2004 02:47 AM
Re: How to remove files and directories recursively
Apologies Umapathy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 02:48 AM
тАО02-23-2004 02:48 AM
Re: How to remove files and directories recursively
BTW I get a 404 file not found error when I try to submit points. Something is amiss but I see that the points were assigned :o)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 02:54 AM
тАО02-23-2004 02:54 AM
Re: How to remove files and directories recursively
Vern
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 05:11 PM
тАО02-23-2004 05:11 PM
Re: How to remove files and directories recursively
Just as an FYI, RedHat enables the -i (interactive) option on the rm command by default. That's why you got all the questions. The same thing will happen if you do an 'rm *' in a directory. You'll get prompted to delete each file.
Hehe, you either get used to it, or always put the -f in the command. It's safer to get used to it and only use -f when you're *really* sure!
Regards,
Seth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 06:02 PM
тАО02-23-2004 06:02 PM
Re: How to remove files and directories recursively
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 06:42 PM
тАО02-23-2004 06:42 PM
Re: How to remove files and directories recursively
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2004 12:03 AM
тАО02-24-2004 12:03 AM
Re: How to remove files and directories recursively
I'm still getting the "404 File Not Found" error when I try to submit points in this forum. It is a stickey error message; only way I've found out of it is to log out then reconnect.
Vern
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2004 12:06 AM
тАО02-24-2004 12:06 AM
Re: How to remove files and directories recursively
That 404 error is being worked on at the moment. What is happening is the page showing an aknowledgemnt for your point assignment is missing. The points are actually assigned and all is well with the world. You just need to "back" your browser a bit to get back to where you want to be.