Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-07-2003, 12:12 PM   #1
Registered: Sep 2003
Posts: 97

Rep: Reputation: 15
rm command even as root

hi i'm trying to get rid of a file that i have on my desktop. it's actually a directory but whatever. here's what i get:
chase@cacole chase]$ su
[root@cacole chase]# rm /home/chase/Desktop/zsnes-1.36/
rm: remove directory `/home/chase/Desktop/zsnes-1.36/'? y
rm: cannot remove directory `/home/chase/Desktop/zsnes-1.36/': Is a directory

Note that i'm a root as i try this and it still doesn't delete my directory. what's the problem?
Old 11-07-2003, 12:14 PM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 261Reputation: 261Reputation: 261
rmdir will delete empty directories

rm -rf will delete a directory with contents in it.
Old 11-07-2003, 12:22 PM   #3
LQ Guru
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Try becoming full root

su -
Old 11-07-2003, 12:23 PM   #4
Registered: Jun 2002
Distribution: Suse, Redhat, Knoppix
Posts: 104

Rep: Reputation: 15
In order to remove a directory you have to remove all the files in it first then use rmdir like trickykid said.

Note that 'rm -rf' is a dangerous command - make sure you're in the right directory before executing that one!
Old 11-07-2003, 12:45 PM   #5
Registered: Sep 2003
Posts: 97

Original Poster
Rep: Reputation: 15
Thank you all


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
Is there some command to clone root a/c DriveMeCrazy AIX 1 09-05-2005 06:09 AM
Command to Login as Root Sleepy_Sentry Linux - Newbie 2 08-12-2005 01:14 PM
how do i sign into root with one command? provkitir Linux - Newbie 12 10-28-2004 07:08 PM
Doing command as root Ephracis Linux - Software 2 10-27-2004 04:30 AM
root command zokter Linux - Newbie 4 06-14-2003 05:26 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:11 AM.

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
Open Source Consulting | Domain Registration