rmdir when directory is not empty
kevin.kempter at dataintellect.com
kevin.kempter at dataintellect.com
Tue Dec 20 18:18:05 UTC 2005
On Tuesday 20 December 2005 11:05, Chasecreek Systemhouse wrote:
> 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
rm -fr directoryname
More information about the fedora-list
mailing list