rmdir when directory is not empty
Chasecreek Systemhouse
chasecreek.systemhouse at gmail.com
Tue Dec 20 18:05:53 UTC 2005
On 12/20/05, kebbelj at scripting-solutions.com
<kebbelj at scripting-solutions.com> 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
More information about the users
mailing list