Re: rmdir when directory is not empty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/20/05, kebbelj@xxxxxxxxxxxxxxxxxxxxxxx
<kebbelj@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> In the GUI, I can trash a non-empty directory with a right-click and Move to Trash. What command line option would I use with rmdir to remove a non-empty directory?


The best way to nuke a directory is -

# Delete the files.
su - -c "find /path/to/dirName -type f -exec rm -f {} \;"

# Delete the directory paths.
su - -c "rmdir -p /path/to/dirName"

HTH/Bill
--
WC -Sx- Jones | http://ccsh.us/ | Open Source Consulting


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux