Re: [newbie] Removing a full directory via command line

2001-04-09 Thread Tim Holmes

Just because I can't help myself, RTFM!

  OPTIONS
 -d, --directory
  Remove directories with `unlink'  instead  of  `rmdir',
  and don't require a directory to be empty before trying
  to unlink it.  Only works for the super-user.   Because
  unlinking  a  directory causes any files in the deleted
  directory to become unreferenced, it is  wise  to  fsck
  the filesystem after doing this.

 -f, --force
  Ignore nonexistent files and never prompt the user.

 -i, --interactive
  Prompt whether to remove each file.   If  the  response
  does not begin with `y' or `Y', the file is skipped.

 -r, -R, --recursive
  Remove the contents of directories recursively.

 -v, --verbose

All of which is located in the manpage, on your machine.

But I will add some remarks to what other people have said.   In your
.shellrc there are some "dummy aliases."  And there is one for rm
in there.  Of which most people think having, is a really good idea.

Even those that are extremely comfortable with command line operating
and would prefer to do work that way, leave that in there.  Because
you can type the correct command, but in the wrong directory.  

For example, you want to delete your Netscape cache, so you type:

rm -R *

But if you're not in $HOME/.netscape, but you're in $HOME/ then you've
just created a really bad day for yourself if you haven't backed up your
system very recently!   So I would suggest leaving the alias in your 
.shellrc file for safety, and those half asleep nights when you're
trying to do something before heading to bed.
tdh


T. Holmes
Unixtechs.org
[EMAIL PROTECTED]

"Real Men use Vi."

* Andrew Iovannisci [EMAIL PROTECTED] [010407 19:49]:
| Hi all,
| 
| Is there a way to delete a non-empty directory via the command line
| without going through the trouble of removing every file and sub-directory 
| first?
| 
| 
| -- 
| Thanks,
| Andy
| 
| Mandrake 7.2
| KDE 2.1
| kernal 2.2.17
| Registered Linux User # 202836




Re: [newbie] Removing a full directory via command line

2001-04-08 Thread Dan

--- Andrew Iovannisci [EMAIL PROTECTED] wrote:
 Hi all,
 
 Is there a way to delete a non-empty directory via
 the command line
 without going through the trouble of removing every
 file and sub-directory 
 first?
 
 
 -- 
 Thanks,
 Andy
 
 Mandrake 7.2
 KDE 2.1
 kernal 2.2.17
 Registered Linux User # 202836
rm -r

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




Re: [newbie] Removing a full directory via command line

2001-04-08 Thread Roger Sherman

On Sun, 8 Apr 2001, Dan wrote:

 --- Andrew Iovannisci [EMAIL PROTECTED] wrote:
  Hi all,
  
  Is there a way to delete a non-empty directory via
  the command line
  without going through the trouble of removing every
  file and sub-directory 
  first?
  
  
  -- 
  Thanks,
  Andy
  
  Mandrake 7.2
  KDE 2.1
  kernal 2.2.17
  Registered Linux User # 202836
 rm -r

I'd always used rm -rf myself...


 
 __
 Do You Yahoo!?
 Get email at your own domain with Yahoo! Mail. 
 http://personal.mail.yahoo.com/
 
 
 





Re: [newbie] Removing a full directory via command line

2001-04-08 Thread Mark Weaver

Actually, I prefer

rm -Rvf directory-name

Mark

On Sun, 8 Apr 2001, Roger Sherman wrote:

 On Sun, 8 Apr 2001, Dan wrote:

  --- Andrew Iovannisci [EMAIL PROTECTED] wrote:
   Hi all,
  
   Is there a way to delete a non-empty directory via
   the command line
   without going through the trouble of removing every
   file and sub-directory
   first?
  
  
   --
   Thanks,
   Andy
  
   Mandrake 7.2
   KDE 2.1
   kernal 2.2.17
   Registered Linux User # 202836
  rm -r

 I'd always used rm -rf myself...


 
  __
  Do You Yahoo!?
  Get email at your own domain with Yahoo! Mail.
  http://personal.mail.yahoo.com/
 
 
 







[newbie] Removing a full directory via command line

2001-04-07 Thread Andrew Iovannisci

Hi all,

Is there a way to delete a non-empty directory via the command line
without going through the trouble of removing every file and sub-directory 
first?


-- 
Thanks,
Andy

Mandrake 7.2
KDE 2.1
kernal 2.2.17
Registered Linux User # 202836




Re: [newbie] Removing a full directory via command line

2001-04-07 Thread Jesse C. Chang

Andrew Iovannisci wrote:

 Is there a way to delete a non-empty directory via the command line
 without going through the trouble of removing every file and sub-directory 
 first?

rm -r directoryname


Jesse

-- 
   !!   Jesse C. Chang  [EMAIL PROTECTED]
 [___]
  `|'   "I have the simplest tastes.  I am always
  /|\   satisfied with the best."  -- Oscar Wilde




Re: [newbie] Removing a full directory via command line

2001-04-07 Thread Andrew Iovannisci

On Saturday 07 April 2001 20:30, you wrote:

 Yeah, use rm - r directory name

 make sure that there is no alias for rm that asks for confirmation for
 deletion, otherwise if you delete a large directory structure, you will
 get to confirm lots and lots of files.

Ahh, I have an alias rm="rm -i" that is forcing me to confirm the deletion of 
every file. So, how do I get rid of the alias?
-- 
Thanks,
Andy

Mandrake 7.2
KDE 2.1
kernal 2.2.17
Registered Linux User # 202836




Re: [newbie] Removing a full directory via command line

2001-04-07 Thread Jesse C. Chang

Andrew Iovannisci wrote:

 Ahh, I have an alias rm="rm -i" that is forcing me to confirm the deletion of 
 every file. So, how do I get rid of the alias?

unalias rm


Jesse

-- 
   !!   Jesse C. Chang  [EMAIL PROTECTED]
 [___]
  `|'   "I have the simplest tastes.  I am always
  /|\   satisfied with the best."  -- Oscar Wilde




Re: [newbie] Removing a full directory via command line

2001-04-07 Thread Digital Wokan

Prefix it with a backslash.  That overrides aliases.
\rm -r /home (just kidding about the /home part)

Andrew Iovannisci wrote:
 Ahh, I have an alias rm="rm -i" that is forcing me to confirm the deletion of
 every file. So, how do I get rid of the alias?
 --
 Thanks,
 Andy
-- 
Digital Wokan, Tribal Mage of the Electronics Age
Guerilla Linux Warrior




Re: [newbie] Removing a full directory via command line

2001-04-07 Thread Daniel J. Ferris

I think I sent that message to your real e-mail address instead of the
list.  Whoops. :-)

Anyway...

At the command line just type:

unalias rm

Then rm will no longer be aliased by the shell.

Just please PLEASE remember never to run rm -r as root or you face the
very real danger of trashing your system.

Also, be VERY careful if the directory you are deleting contains symbolic
links, because rm -r will follow them.  If you have write permissions to
the files the link points to, they will be trashed as well.

Dan

On Sat, 7 Apr 2001, Andrew Iovannisci wrote:

 On Saturday 07 April 2001 20:30, you wrote:

  Yeah, use rm - r directory name
 
  make sure that there is no alias for rm that asks for confirmation for
  deletion, otherwise if you delete a large directory structure, you will
  get to confirm lots and lots of files.

 Ahh, I have an alias rm="rm -i" that is forcing me to confirm the deletion of
 every file. So, how do I get rid of the alias?


-- 
Ad astra per aspera.
[To the stars by aspiration.]