LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   rm command even as root (https://www.linuxquestions.org/questions/linux-software-2/rm-command-even-as-root-113460/)

ch4s3r 11-07-2003 12:12 PM

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
Password:
[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?

trickykid 11-07-2003 12:14 PM

rmdir will delete empty directories

rm -rf will delete a directory with contents in it.

fancypiper 11-07-2003 12:22 PM

Try becoming full root

su -

pfunk 11-07-2003 12:23 PM

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! :)

ch4s3r 11-07-2003 12:45 PM

Thank you all


All times are GMT -5. The time now is 02:57 PM.