LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Very confusing rm (https://www.linuxquestions.org/questions/linux-newbie-8/very-confusing-rm-34487/)

Luc 11-03-2002 11:01 AM

Very confusing rm
 
ive tried to remove (unlink) a directory unter suse 7.2:

> rm mysql_install_db
> rm: `mysql_install_db' is a directory

> rm --help
[...]
> Remove (unlink) the FILE(s).
>
> -d, --directory unlink directory, even if non-empty (super-user only)

>rm -d mysql_install_db
> rm: cannot unlink `mysql_install_db': Is a directory


How can I delete this damn directory?

neo77777 11-03-2002 11:04 AM

if the directory isn't empty you can recursively remove the contents
rm -r dirname/
if the directory is empty
rmdir dirname/
will suffice

adam_boz 11-03-2002 04:32 PM

If you are trying to unlink something, make sure that you are using the "rm -d" on the linked dir, not the actual one.

Luc 11-04-2002 02:42 PM

thx. rm -r dirname/ is working....


All times are GMT -5. The time now is 04:56 AM.