LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-16-2003, 08:45 PM   #1
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Rep: Reputation: 30
Unix cammands


What command do i use to delete a directory that is not empty and that does not need special permissions. The only one i can find is rmdir but it only removes it if its empty and theres no switch.?
 
Old 09-16-2003, 08:46 PM   #2
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
rm -rf directory (or -rvf if you want to see all the files being deleted )
 
Old 09-16-2003, 09:15 PM   #3
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Original Poster
Rep: Reputation: 30
Thanks,
 
Old 09-16-2003, 09:19 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
This is asked all the time, a quick search would have found many results. But on to my point in posting, which is mentioned all the time but I'm going to say it again:

When using a command like rm -rf and especially as root, be sure to type this command carefully, as it will delete anything without any questions asked. If you goof up and accidently type something like this with a space bewteen the / and the next character like: rm -rf / home/user/somefile

That will delete your own system and every file on it...

Regards...
 
Old 09-16-2003, 09:31 PM   #5
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
Quote:
Originally posted by trickykid
When using a command like rm -rf and especially as root, be sure to type this command carefully, as it will delete anything without any questions asked. If you goof up and accidently type something like this with a space bewteen the / and the next character like: rm -rf / home/user/somefile

That will delete your own system and every file on it...
thanks for elaborating on that, TK. usually i write something like "be careful " but for some reason i didn't that time. you maybe saved someone from a deleted disk.
 
Old 09-17-2003, 12:17 AM   #6
php
Member
 
Registered: Jun 2001
Location: USA
Distribution: Slackware
Posts: 827

Rep: Reputation: 30
Quote:
Originally posted by synaptical
thanks for elaborating on that, TK. usually i write something like "be careful " but for some reason i didn't that time. you maybe saved someone from a deleted disk.

too late
 
Old 09-17-2003, 08:11 AM   #7
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
Quote:
Originally posted by hackers_
too late
is that supposed to mean something?
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
the best "unix like" or "unix" operating system melinda_sayang General 12 12-03-2004 02:50 AM
Unix Book for Beginners (Not Linux... Unix) suse2166 General 6 11-25-2004 11:46 AM
UNIX (Linux, BSD, etc) Programming :: UNIX kuphryn Programming 8 04-04-2004 11:50 PM
Why did you experienced users of Unix change to unix over Windows? Laptop2250 Linux - General 11 10-28-2003 11:51 AM
How to schedule unix script periodically from unix os level??? gopi_20us Programming 2 03-11-2002 06:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:33 AM.

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