|
|
#1 | |
|
Registered User
Join Date: Oct 2002
Posts: 38
|
Hi All!
How do You delete a Directory and all it's contents? Thanks and Love You! FishTech
__________________
BIBLICAL REVELATIONS |
|
|
|
|
|
|
#2 | |
|
Its me! Hurray!
Join Date: Jul 2002
Location: Brit in USA
Posts: 1,203
|
rm -rf /somedirectory
be careful ![]()
__________________
Core2 Q9400 @ 3.0, eVGA GTX 260, 4G DDR 800, Vista64 |
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Oct 2002
Posts: 38
|
Thanks DaveW,
I tried it but it didn't work?... I'm using Mandrake 9.0 if that makes a difference. Also, as Root/Superuser don't I have the authority to delete any directory or file?... These directorys and files (that are now in the trash) that I'm trying to delete even as Root tell me acess denied... What's up with that?
__________________
BIBLICAL REVELATIONS |
|
|
|
|
|
#4 | |
|
Its me! Hurray!
Join Date: Jul 2002
Location: Brit in USA
Posts: 1,203
|
Dunno... rm -rf is pretty much the only Linux command I know
![]() Can anyone else help out here?
__________________
Core2 Q9400 @ 3.0, eVGA GTX 260, 4G DDR 800, Vista64 |
|
|
|
|
|
|
#5 |
|
prodigy
Join Date: Jul 2002
Location: USA, NY
Posts: 1,100
|
rmdir directory/* to get rid of all files and dir
rmdir -rf directory or try rmdir -rf directory/* NOTE:i dont use this to often, it can be risky especially at cmd line level unix and linux commands are all universal. So if u know unix cmd line scripting u can use that for linux cmd scripting too. By the way out of curiousity what directory are u nuking? cheers dexta
__________________
Last edited by de><ta; 11-01-02 at 02:31 PM. |
|
|
|
|
|
#6 | |
|
Registered User
Join Date: Aug 2002
Location: Germany
Posts: 134
|
" Hi All!
How do You delete a Directory and all it's contents? Thanks and Love You!" The "BIBLICAL REVELATION(S)" will LOVE you too while deleting a Directory, i'm almost sure. (i hope my non-technical remark does not violate any thread 'laws', hmmmm.) |
|
|
|
|
|
|
#7 |
|
Registered User
Join Date: Oct 2002
Posts: 38
|
Hi de><ta, and thanks DaveW,
I tried them all and nothing worked... Am I doing something wrong?... Here's my shell session: [peacemaker@localhost Trash]$ su Password: [root@localhost Trash]# rmdir -rf Kvidtune/* rmdir: invalid option -- r Try `rmdir --help' for more information. [root@localhost Trash]# rmdir -rf Kvidtune rmdir: invalid option -- r Try `rmdir --help' for more information. [root@localhost Trash]# rmdir Kvidtune/* rmdir: `Kvidtune/kvidtune-0.4.1': Directory not empty [root@localhost Trash]#
__________________
BIBLICAL REVELATIONS |
|
|
|
|
|
#8 |
|
Registered User
|
what about 'rm -rf Kvidtune' ?
that will work, the 'r' is for recursively and the 'f' means force, without 'f' rm can't delete a directory. cheers |
|
|
|
|
|
#9 |
|
Guest
Posts: n/a
|
rm -r nameofdirectory
works for me mdk9.0 |
|
|
|
#10 |
|
Registered User
|
synonymy: you're right, should have done some proof reading
![]() the 'f' flag is needed incase there is a read-only file, as 'rm' would choke on it and ask if you were really sure..... cheers |
|
|
|
|
|
#11 |
|
Registered User
Join Date: Oct 2002
Posts: 38
|
Thanks Everyone,
'rm -r' worked... I did however have to answer 'y' for each and every file that I wanted to delete within the directory... Would there be an easier way?
__________________
BIBLICAL REVELATIONS |
|
|
|
|
|
#12 |
|
Registered User
|
'rm -rf' as I wrote and explained one post above.
or do 'unalias rm', then rm -f will do also ![]() I assume it's either RH or MDK? am I right? cheers redhat (dunno MDK) set 'rm' to 'rm -i' (I know not exactly, it's just an alias, but we may keep that up for further axplanations later on, may we?) |
|
|
|
![]() |
| Thread Tools | |
|
|