![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can not delete Directory | Clevelaw | AIX | 9 | 05-21-2008 07:53 AM |
| Can't delete directory | funksen | SUN Solaris | 4 | 03-09-2007 11:14 AM |
| delete a directory | madmat | UNIX for Dummies Questions & Answers | 4 | 01-25-2007 08:14 AM |
| Can't delete a directory on HP-UX | oradbus | HP-UX | 2 | 05-31-2005 12:32 PM |
| remove a nonempty directory | babayeve | UNIX for Dummies Questions & Answers | 2 | 08-26-2002 08:34 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
How to delete nonempty directory?
How to delete nonempty directory?
Thanks |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
The directory has to be empty to use the rmdir command.. you can use rm yourdir/*; rmdir yourdir
Or you can use rm -r yourdir, but be careful. This is recursive, so all the files in yourdir will be deleted, then yourdir will be deleted, and if the directory yourdir was in is now empty, that will get deleted too. Read the rm man page for more info. Last edited by oombera; 04-30-2003 at 10:32 PM. |
|
#3
|
|||
|
|||
|
I'd suggest using rm -r ./yourdir from one dir level higher just so you're sure that deleting the correct directory. rm -r isn't very forgiving.
If you don't want it to ask you for confirmations you can use rm -rf ./yourdir. |
|||
| Google The UNIX and Linux Forums |