LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Deleting a directory (https://www.linuxquestions.org/questions/linux-newbie-8/deleting-a-directory-459136/)

esm03 06-28-2006 10:26 AM

Deleting a directory
 
How do I manually delete a directory in terminal. For example I need to delete /opt/ibm/itm

Nylex 06-28-2006 10:28 AM

If it's empty, you can use rmdir, i.e. "rmdir /opt/ibm/itm". If it isn't empty, you can use rm with the r and f flags, i.e. "rm -rf /opt/ibm/itm". See the rm and rmdir man pages as well. You'll likely need to be root to run these.

ethics 06-28-2006 11:15 AM

when deleting anything in directories such as opt/usr/bin etc. i like to use rm with the -v option to show what it's doing (if theres alot of files, i wonder if it hangs) and the -i (interactive, so i dont delete something by accident)

Code:

man rm
will tell you alot more about the command and it's switches


All times are GMT -5. The time now is 10:43 AM.