Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-28-2006, 10:26 AM   #1
LQ Newbie
Registered: Jun 2006
Posts: 6

Rep: Reputation: 0
Deleting a directory

How do I manually delete a directory in terminal. For example I need to delete /opt/ibm/itm
Old 06-28-2006, 10:28 AM   #2
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
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.
Old 06-28-2006, 11:15 AM   #3
Senior Member
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
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)

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting a Directory using c++ in Linux ArulPrabhuT Programming 11 08-20-2011 11:10 AM
deleting directory w/o descending STAGED Linux - Newbie 5 08-24-2005 08:39 AM
"WARNING: Circular directory structure" error when deleting directory pistonbrew Linux - Software 5 02-03-2005 06:05 AM
Deleting a directory... closet geek Linux - General 7 07-09-2003 06:25 AM
deleting non-empty directory sadiboyz Linux - Newbie 2 04-21-2003 09:29 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:10 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration