unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How delete a not empty directory in the Dired buffer?
@ 2004-09-23  7:21 Giannandrea Castaldi
  2004-09-23  8:39 ` zrr
  2004-09-23  8:47 ` Christian Lynbech
  0 siblings, 2 replies; 6+ messages in thread
From: Giannandrea Castaldi @ 2004-09-23  7:21 UTC (permalink / raw)


Hi all,
I'd like to delete not empty directories using emacs (these directory 
are under CVS so emacs should update CVS data). When I select the 
directories to delete in the Dired buffer and press 'D' it fails 
beacause the directories aren't empty. There is a way in the Dired 
buffer to delete not empty dir?

Thanks.

Giannandrea

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How delete a not empty directory in the Dired buffer?
  2004-09-23  7:21 How delete a not empty directory in the Dired buffer? Giannandrea Castaldi
@ 2004-09-23  8:39 ` zrr
  2004-10-01 16:52   ` Daniel L Elliott
  2004-09-23  8:47 ` Christian Lynbech
  1 sibling, 1 reply; 6+ messages in thread
From: zrr @ 2004-09-23  8:39 UTC (permalink / raw)


Giannandrea Castaldi <g.castal@tiscali.it> writes:

(setq dired-recursive-copies 'top)
(setq dired-recursive-deletes 'top)

> Hi all,
> I'd like to delete not empty directories using emacs (these directory 
> are under CVS so emacs should update CVS data). When I select the 
> directories to delete in the Dired buffer and press 'D' it fails 
> beacause the directories aren't empty. There is a way in the Dired 
> buffer to delete not empty dir?
>
> Thanks.
>
> Giannandrea

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How delete a not empty directory in the Dired buffer?
  2004-09-23  7:21 How delete a not empty directory in the Dired buffer? Giannandrea Castaldi
  2004-09-23  8:39 ` zrr
@ 2004-09-23  8:47 ` Christian Lynbech
  1 sibling, 0 replies; 6+ messages in thread
From: Christian Lynbech @ 2004-09-23  8:47 UTC (permalink / raw)


>>>>> "Giannandrea" == Giannandrea Castaldi <g.castal@tiscali.it> writes:

Giannandrea> ... is a way in the Dired buffer to delete not empty dir?

The simplest is to use `!' which allows you to execute a command on
the file/directory which is pointed out by the cursor. That command
could be "rm -rf" which will remove the directory and all of its
contents.

In other words, you would place the cursor on the line with the
directory you want to delete and the press:

        ! rm -rf <return>

Beware though that "rm -rf" is not a very safe command so be sure you
are pointing to the correct file or directory!


------------------------+-----------------------------------------------------
Christian Lynbech       | christian #\@ defun #\. dk
------------------------+-----------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
                                        - petonic@hal.com (Michael A. Petonic)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How delete a not empty directory in the Dired buffer?
  2004-09-23  8:39 ` zrr
@ 2004-10-01 16:52   ` Daniel L Elliott
  2004-10-01 17:24     ` zrr
  2004-10-01 17:35     ` J. David Boyd
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel L Elliott @ 2004-10-01 16:52 UTC (permalink / raw)


I'm sorry, what does 'top signify?

On Thu, 23 Sep 2004 16:39:34 +0800, zrr wrote:

> (setq dired-recursive-copies 'top)
> (setq dired-recursive-deletes 'top)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How delete a not empty directory in the Dired buffer?
  2004-10-01 16:52   ` Daniel L Elliott
@ 2004-10-01 17:24     ` zrr
  2004-10-01 17:35     ` J. David Boyd
  1 sibling, 0 replies; 6+ messages in thread
From: zrr @ 2004-10-01 17:24 UTC (permalink / raw)


Daniel L Elliott <dan_elliott_at_cox_dot_net@spam_is_pathetic.com> writes:

dired-recursive-copies's value is top

*Decide whether recursive copies are allowed.
nil means no recursive copies.
`always' means copy recursively without asking.
`top' means ask for each directory at top level.
Anything else means ask for each directory.

You can customize this variable.

Defined in `dired-aux'.

[back]

> I'm sorry, what does 'top signify?
>
> On Thu, 23 Sep 2004 16:39:34 +0800, zrr wrote:
>
>> (setq dired-recursive-copies 'top)
>> (setq dired-recursive-deletes 'top)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How delete a not empty directory in the Dired buffer?
  2004-10-01 16:52   ` Daniel L Elliott
  2004-10-01 17:24     ` zrr
@ 2004-10-01 17:35     ` J. David Boyd
  1 sibling, 0 replies; 6+ messages in thread
From: J. David Boyd @ 2004-10-01 17:35 UTC (permalink / raw)


Daniel L Elliott <dan_elliott_at_cox_dot_net@spam_is_pathetic.com> writes:

> I'm sorry, what does 'top signify?
> 
> On Thu, 23 Sep 2004 16:39:34 +0800, zrr wrote:
> 
> > (setq dired-recursive-copies 'top)
> > (setq dired-recursive-deletes 'top)



*Decide whether recursive deletes are allowed.
nil means no recursive deletes.

`always' means delete recursively without asking.  This is DANGEROUS!

`top' means ask for each directory at top level, but delete its subdirectories
without asking.

Anything else means ask for each directory.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-10-01 17:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-23  7:21 How delete a not empty directory in the Dired buffer? Giannandrea Castaldi
2004-09-23  8:39 ` zrr
2004-10-01 16:52   ` Daniel L Elliott
2004-10-01 17:24     ` zrr
2004-10-01 17:35     ` J. David Boyd
2004-09-23  8:47 ` Christian Lynbech

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).