This is a discussion on Linux Recursively Delete Subdirectories within the Linux software forums, part of the Linux Getting Started category; To recursively delete subdirectories and all files, use the following syntax: Code: rm -rf /path/to/directory For example, recursively delete subdirectories ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
To recursively delete subdirectories and all files, use the following syntax:
Code:
rm -rf /path/to/directory Code:
rm -rf /home/test/data Code:
find . -type f -name "*.bak" -exec rm -i '{}' \;
find . -type f -name "*.bak" -exec rm -f '{}' \;
Be careful examples may result into data loss, use them carefully
__________________
Raj Linux rulz. I have never turned back in my life ; I shall not do so today.. haha |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shell script to restructure folders recursively | kalt | Shell scripting | 2 | 10-26-2007 12:47 AM |
| Delete all tables mysql under Linux | jerry | Databases servers | 1 | 06-09-2007 05:50 PM |
| Linux find and delete files | cbzee | Linux software | 4 | 12-20-2006 12:01 PM |
| delete directory linux | chiku | Linux software | 4 | 07-22-2006 06:56 PM |
| copying files from subdirectories | kavi | Shell scripting | 2 | 09-18-2005 12:37 AM |