Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rm directory

Status
Not open for further replies.

cyberrate

Programmer
Dec 9, 2003
24
0
0
EE
Hello!


How do i remove directory from shell on Linux machine?

I tryed:

rm -d myDir

but it still says:

rm: cannon remove directory 'myDir' : Is a directory


Anyone?
 
I think it doesn't want to remove it because it has files or sub-directories still in it. Try this:

rm -R myDir

The -R means go down into the deepest darkest depths and nuke everything.
 
use rm -r to recusively remove the dir. You might need to use -f also.

rm -rf DIR/



>---------------------------------------Lawrence Feldman
SR. QA. Engineer SNAP Appliance
lfeldman@snapappliance.com

 
try;

# rm -fr <file_name | directory>

Note: <file_name> or <directory>
 
Hi,

Don't forget the value of "man rm" or "info rm" to find out what you can do!
 
Don't forget the value of "man rm" or "info rm" to find out what you can do!"

I would only add that you should also use man rm to find out what you can do inadvertently! Been there as have most of us. For critical deletes us rm -i to give you the option to back out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top